File: qcapluginpath.qcm

package info (click to toggle)
qca2 2.0.3-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 17,376 kB
  • ctags: 10,445
  • sloc: cpp: 40,699; ansic: 631; perl: 241; sh: 51; makefile: 19
file content (39 lines) | stat: -rw-r--r-- 837 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
-----BEGIN QCMOD-----
name: qcapluginpath
section: project
arg: plugins-path=[path],Path to install to (unix only).  Default: qtdir/plugins
-----END QCMOD-----
*/

class qc_qcapluginpath : public ConfObj
{
public:
	qc_qcapluginpath(Conf *c) : ConfObj(c) {}
	QString name() const { return "qcapluginpath"; }
	QString shortname() const { return "qcapluginpath"; }

	// no output
	QString checkString() const { return QString(); }

	bool exec()
	{
#ifndef Q_OS_WIN
		QString plugins_path = conf->getenv("QC_PLUGINS_PATH");

		// default to qtdir
		if(plugins_path.isEmpty())
			plugins_path = QLibraryInfo::location(QLibraryInfo::PluginsPath);

		// install into plugins path
		QString str;
		str += QString(
		"target.path=%1/crypto\n"
		"INSTALLS += target\n"
		).arg(plugins_path);
		conf->addExtra(str);
#endif

		return true;
	}
};