mirror of
https://github.com/redis/RedisDesktopManager.git
synced 2026-10-24 08:25:03 +08:00
Remove legacy/unused/unsuppported code & files
-Update .travis.yml -Restart app automatically on settings change -Fix unit tests compilation -Update Info.plist.sample -Update rdm.icns -Update logo
This commit is contained in:
+11
-23
@@ -3,36 +3,24 @@
|
||||
#include <QGuiApplication>
|
||||
|
||||
#include "app/app.h"
|
||||
#include "modules/crashhandler/crashhandler.h"
|
||||
|
||||
#ifdef LINUX_SIGNALS
|
||||
#include <sigwatch.h>
|
||||
#endif
|
||||
#define RESTART_CODE 1000
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_LINUX)
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
#endif
|
||||
int returnCode = 0;
|
||||
|
||||
#ifndef QT_DEBUG
|
||||
QFileInfo appPath(QString::fromLocal8Bit(argv[0]));
|
||||
QString appDir(appPath.absoluteDir().path());
|
||||
QString crashReporterPath = QString("%1/crashreporter").arg(appDir.isEmpty() ? "." : appDir);
|
||||
CrashHandler::instance()->Init(QDir::homePath(), appPath.absoluteFilePath(), crashReporterPath);
|
||||
#endif
|
||||
do
|
||||
{
|
||||
Application a(argc, argv);
|
||||
a.initModels();
|
||||
a.initQml();
|
||||
returnCode = a.exec();
|
||||
} while(returnCode == RESTART_CODE);
|
||||
|
||||
Application a(argc, argv);
|
||||
a.initModels();
|
||||
a.initQml();
|
||||
|
||||
#ifdef LINUX_SIGNALS
|
||||
UnixSignalWatcher sigwatch;
|
||||
sigwatch.watchForSignal(SIGINT);
|
||||
sigwatch.watchForSignal(SIGTERM);
|
||||
QObject::connect(&sigwatch, SIGNAL(unixSignal(int)), &a, SLOT(quit()));
|
||||
#endif
|
||||
|
||||
return a.exec();
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user