aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-06-17 17:57:07 +0000
committerSaturneric <[email protected]>2021-06-17 17:57:07 +0000
commit7e218e5ddc1d8f7eb6008fae070335d759946356 (patch)
tree04cc5fa7b8397fa5ebb06f1824af8d04d6930fa4 /src/main.cpp
parentMake it possible to compile and run on Windows. (diff)
downloadGpgFrontend-7e218e5ddc1d8f7eb6008fae070335d759946356.tar.gz
GpgFrontend-7e218e5ddc1d8f7eb6008fae070335d759946356.zip
Improve project configuration files.
Automatically copy resource files during project settings. Change the name of the build target to gpgfrontend. Automatic configuration of compilation information such as version number during project setting. Solve the problem that Windows cannot run normally.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6cb84d25..7ce4a946 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -26,14 +26,14 @@
int main(int argc, char *argv[]) {
- Q_INIT_RESOURCE(gpg4usb);
+ Q_INIT_RESOURCE(gpgfrontend);
QApplication app(argc, argv);
// get application path
QString appPath = qApp->applicationDirPath();
- QApplication::setApplicationVersion("1.0.0");
+ QApplication::setApplicationVersion(BUILD_VERSION);
QApplication::setApplicationName("GPGFrontend");
// dont show icons in menus
@@ -67,11 +67,11 @@ int main(int argc, char *argv[]) {
lang = QLocale::system().name();
}
- translator.load("ts/gpg4usb_" + lang, appPath);
+ translator.load("./ts/gpg4usb_" + lang, appPath);
QApplication::installTranslator(&translator);
// set qt translations
- translator2.load("ts/qt_" + lang, appPath);
+ translator2.load("./ts/qt_" + lang, appPath);
QApplication::installTranslator(&translator2);
MainWindow window;