Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted by freeppe ( 14 years ago )
#include "QCBAdapter.h"
#include <QDebug>
#include <QtGui/QApplication>
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QCBAdapter * adapter = new QCBAdapter(&app;);
QDBusConnection connection = QDBusConnection::connectToBus(QDBusConnection::SessionBus, "DBus.Manager.PrintString");
if (connection.isConnected())
qDebug() << "Connection error";
//printf("Соединение установлено\n");
if (connection.registerService("DBus.Manager.PrintString")) {
//printf("Не могу зарегистрировать сервис\n");
qDebug() << "register error";
exit(1);
}
if (!connection.registerObject("/PrintString", adapter, QDBusConnection::ExportAllContents)) {
qDebug() << "object register error";
//printf("Не могу зарегистрировать объект\n");
exit(1);
}
return app.exec();
}
Revise this Paste