Skip to content
Browse files

修改版本和qt4.7版本的兼容问题

  • Loading branch information...
1 parent 76651bf commit df9e8065f66971f1b7871ffc72e38e65896e9cca @zhanlangsir committed
Showing with 6 additions and 1 deletion.
  1. +1 −1 CMakeLists.txt
  2. +5 −0 src/main.cpp
View
2 CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(Qtqq)
-set(version 0.8.1-alpha)
+set(version 0.8.2-alpha)
INCLUDE(FindX11)
find_package(Qt4 REQUIRED)
View
5 src/main.cpp
@@ -29,7 +29,12 @@ int main(int argc, char *argv[])
QTranslator translator;
QString transla_file_path = QQGlobal::dataDir() + "/translations";
+
+#if QT_VERSION >= 0x040800
translator.load(QLocale::system(), "qtqq", "_", transla_file_path, ".qm");
+#else
+ translator.load(transla_file_path + '/' + "qtqq_zh");
+#endif
a.installTranslator(&translator);
Log4Qt::LogManager::setHandleQtMessages(true);

0 comments on commit df9e806

Please sign in to comment.
Something went wrong with that request. Please try again.