Don't delete QApplication as it causes problems (big font size)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@171 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 17 years ago
parent 1be77c9e10
commit 9de7489805
  1. 2
      src/lib/tools.h
  2. 18
      src/main.cpp
  3. 2
      src/main_unix.cpp

@ -38,4 +38,4 @@ QString decodeFileError(QFile::FileError Code);
QString makePathRelative(const QString& Abs,const QString& Cur);
QString getImageFile(const QString& name);
#endif //TOOLS_H
#endif //TOOLS_H

@ -62,12 +62,15 @@ void initAppPaths(int argc, char **argv);
int main(int argc, char **argv)
{
QApplication* app=new QApplication(argc,argv);
QApplication* app;
#if defined(Q_WS_X11) && defined(GLOBAL_AUTOTYPE)
app = new KeepassApplication(argc,argv);
#else
app = new QApplication(argc,argv);
#endif
initAppPaths(argc,argv);
CmdLineArgs args;
args.parse(app->arguments());
delete app;
app=NULL;
args.parse(QApplication::arguments());
qDebug(CSTR(AppDir));
qDebug(CSTR(DataDir));
//Load Config
@ -130,13 +133,6 @@ int main(int argc, char **argv)
}
}*/
#if defined(Q_WS_X11) && defined(GLOBAL_AUTOTYPE)
if(!app) new KeepassApplication(argc,argv);
#else
if(!app) new QApplication(argc,argv);
#endif
//Internationalization
QLocale loc;
if(!args.language().size())

@ -71,4 +71,4 @@ void initAppPaths(int argc,char** argv) {
AppDir.truncate(AppDir.lastIndexOf("/"));
DataDir=AppDir+"/../share/keepassx";
HomeDir = QDir::homePath()+"/.keepassx";
}
}