Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted by freeppe ( 16 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