X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=main.cpp;h=c1b25ce546ae6350cd76f3a38ede6a72944c7f39;hb=9cf4f564ccdf26db2543830a0f6e0557bfcd5154;hp=647822e13d8ee2fc89de70997cc9ae0b72dd0737;hpb=598038169e0a06479477d78f121775e1d2f68583;p=dorian diff --git a/main.cpp b/main.cpp index 647822e..c1b25ce 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,4 @@ -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) #include #endif @@ -8,28 +8,44 @@ #include "trace.h" #include "settings.h" +static const char *DORIAN_VERSION = +#include "pkg/version.txt" +; + +static const QtMsgType DORIAN_DEFAULT_TRACE_LEVEL = +#ifdef Q_OS_SYMBIAN + QtDebugMsg +#else + QtWarningMsg +#endif + ; + int main(int argc, char *argv[]) { QApplication a(argc, argv); + a.setApplicationName("Dorian"); - a.setApplicationVersion("0.0.1"); + a.setApplicationVersion(DORIAN_VERSION); a.setOrganizationDomain("pipacs.com"); a.setOrganizationName("Pipacs"); Trace::level = (QtMsgType)Settings::instance()-> - value("tracelevel", (int)QtWarningMsg).toInt(); + value("tracelevel", (int)DORIAN_DEFAULT_TRACE_LEVEL).toInt(); qInstallMsgHandler(Trace::messageHandler); MainWindow w; -#ifdef Q_WS_S60 - w.showMaximized(); -#else w.show(); -#endif + +#if 0 // FIXME #ifdef Q_OS_SYMBIAN + // Remove context menu from all widgets + foreach (QWidget *w, QApplication::allWidgets()) { + w->setContextMenuPolicy(Qt::NoContextMenu); + } +#endif // Q_OS_SYMBIAN int ret = a.exec(); if (ret == 1000) { -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) extern char **environ; execve(argv[0], argv, environ); #endif