This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/qcm/qdbus.qcm

44 lines
849 B
Text
Raw Permalink Normal View History

2025-12-25 01:37:49 +05:00
/*
-----BEGIN QCMOD-----
name: QDBUS
-----END QCMOD-----
*/
//----------------------------------------------------------------------------
// qc_qdbus
//----------------------------------------------------------------------------
class qc_qdbus : public ConfObj
{
public:
qc_qdbus(Conf *c) : ConfObj(c) {}
QString name() const { return "QDBUS"; }
QString shortname() const { return "qdbus"; }
bool exec()
{
if (!conf->getenv("QC_DISABLE_qdbus").isEmpty())
return false;
// test for "qdbus" feature
QString proextra =
"CONFIG += qt qdbus\n"
"QT -= gui\n";
QString str =
"\n"
"int main()\n"
"{\n"
" return 0;\n"
"}\n";
int ret;
if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra, &ret))
return false;
if(ret != 0)
return false;
conf->addExtra("CONFIG += dbus");
return true;
}
};