Ver Fonte

V1.6.1

1.修复mingw编译报错的问题
叶海辉 há 6 anos atrás
pai
commit
bba12a25e7
1 ficheiros alterados com 14 adições e 0 exclusões
  1. 14 0
      src/mainwindow.cpp

+ 14 - 0
src/mainwindow.cpp

@@ -17,6 +17,20 @@
 
 #include <QFileDialog>
 
+///mingw使用QStringLiteral 会有问题
+/// 没有_MSC_VER这个宏 我们就认为他用的是mingw编译器
+
+#ifndef _MSC_VER
+#define MINGW
+#endif
+
+#if defined(WIN32) && !defined(MINGW)
+
+#else
+    #define QStringLiteral QString
+#endif
+
+
 MainWindow::MainWindow(QWidget *parent) :
     QMainWindow(parent),
     ui(new Ui::MainWindow)