X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=gui%2Fmain.cpp;h=471dec7939c7eccd88c4d1c882a121ea2a587b08;hb=72b6644225bc5e4cc621cb0721c61fd2ac322330;hp=d7af53dde789c219e76dae1428254f3b58337dfd;hpb=48412ffde3dd4710c96d5e8d9cfdf1789e4d703a;p=apitrace diff --git a/gui/main.cpp b/gui/main.cpp index d7af53d..471dec7 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -3,15 +3,20 @@ #include "apitrace.h" #include "apitracecall.h" +#include "os_string.hpp" +#include "os_process.hpp" + #include #include #include +#include Q_DECLARE_METATYPE(QList); Q_DECLARE_METATYPE(QVector); Q_DECLARE_METATYPE(Qt::CaseSensitivity); Q_DECLARE_METATYPE(ApiTrace::SearchResult); Q_DECLARE_METATYPE(ApiTrace::SearchRequest); +Q_DECLARE_METATYPE(QList); static void usage(void) { @@ -20,6 +25,7 @@ static void usage(void) int main(int argc, char **argv) { + QApplication::setGraphicsSystem("raster"); QApplication app(argc, argv); qRegisterMetaType >(); @@ -28,6 +34,16 @@ int main(int argc, char **argv) qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); + qRegisterMetaType >(); + +#ifndef Q_OS_WIN + os::String currentProcess = os::getProcessName(); + currentProcess.trimFilename(); + QString path = qgetenv("PATH"); + path = QLatin1String(currentProcess.str()) + QLatin1String(":") + path; + qputenv("PATH", path.toLatin1()); +#endif + QStringList args = app.arguments(); int i = 1;