Commit 4d68106d authored by Ronan's avatar Ronan

fix(SingleApplicationDBus): remove useless includes, clean code

parent 628c30ed
......@@ -20,11 +20,7 @@
* Author: Ghislain MARY
*/
#include <cstdlib>
#include <iostream>
#include <QtCore/QByteArray>
#include <QtDBus/QtDBus>
#include <QDBusInterface>
#include "SingleApplication.hpp"
#include "SingleApplicationDBusPrivate.hpp"
......@@ -59,7 +55,7 @@ SingleApplication::SingleApplication (int &argc, char *argv[], bool allowSeconda
: QApplication(argc, argv), d_ptr(new SingleApplicationPrivate(this)) {
Q_D(SingleApplication);
// Store the current mode of the program
// Store the current mode of the program.
d->options = options;
if (!d->getBus().isConnected()) {
......@@ -110,7 +106,7 @@ bool SingleApplication::sendMessage (QByteArray message, int timeout) {
QDBusInterface iface(ServiceName, "/", "", d->getBus());
if (iface.isValid()) {
iface.setTimeout(timeout);
QDBusMessage msg = iface.call(QDBus::Block, "handleMessageReceived", instanceId(), message);
iface.call(QDBus::Block, "handleMessageReceived", instanceId(), message);
return true;
}
......
......@@ -23,7 +23,8 @@
#ifndef SINGLE_APPLICATION_DBUS_PRIVATE_H_
#define SINGLE_APPLICATION_DBUS_PRIVATE_H_
#include <QtDBus/QtDBus>
#include <QDBusAbstractAdaptor>
#include <QDBusConnection>
#include "SingleApplication.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment