mirror of
https://github.com/arcan1s/queued.git
synced 2025-07-14 06:15:47 +00:00
add some reports
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
|
||||
#include "queued/Queued.h"
|
||||
#include <queued/Queued.h>
|
||||
|
||||
#include "QueuedApplicationInterface.h"
|
||||
|
||||
@ -28,10 +28,7 @@ QueuedApplication::QueuedApplication(QObject *parent, const QVariantHash &args)
|
||||
: QObject(parent)
|
||||
, m_configuration(args)
|
||||
{
|
||||
qSetMessagePattern(QueuedDebug::LOG_FORMAT);
|
||||
qCDebug(LOG_APP) << __PRETTY_FUNCTION__;
|
||||
for (auto &metadata : QueuedDebug::getBuildData())
|
||||
qCDebug(LOG_APP) << metadata;
|
||||
|
||||
init();
|
||||
initDBus();
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "queued/Queued.h"
|
||||
#include <queued/Queued.h>
|
||||
|
||||
#include "QueuedApplication.h"
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <queued/Queued.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "QueuedApplication.h"
|
||||
#include "version.h"
|
||||
|
||||
@ -51,7 +53,9 @@ int main(int argc, char *argv[])
|
||||
if (std::string(argv[i]) != "--daemon")
|
||||
continue;
|
||||
::daemon(0, 0);
|
||||
break;
|
||||
}
|
||||
QueuedDebug::applyLogFormat();
|
||||
|
||||
QCoreApplication app(argc, argv);
|
||||
app.setApplicationName(NAME);
|
||||
@ -93,13 +97,13 @@ int main(int argc, char *argv[])
|
||||
if (parser.isSet(infoOption)) {
|
||||
auto metadata = QueuedDebug::getBuildData();
|
||||
for (auto &string : metadata)
|
||||
QDebug(QtMsgType::QtInfoMsg).noquote() << string;
|
||||
std::cout << qPrintable(string) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// check if exists
|
||||
if (existingSessionOperation(QString("Active"))) {
|
||||
qWarning() << "Another session is active";
|
||||
qCWarning(LOG_APP) << "Another session is active";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user