Browse Source

修复ubuntu下编译出错的bug

huihui 4 years ago
parent
commit
37baaaa279
2 changed files with 6 additions and 8 deletions
  1. 4 6
      src/AppConfig.cpp
  2. 2 2
      src/Widget/ShowVideoWidget.cpp

+ 4 - 6
src/AppConfig.cpp

@@ -33,12 +33,6 @@
 #include <sys/time.h>
 #include <stdio.h>
 #include <unistd.h>
-
-void Sleep(long mSeconds)
-{
-    usleep(mSeconds * 1000);
-}
-
 #endif
 
 QString AppConfig::APPID = "{a1db97ad-b8ed-11e9-a297-0235d2b38928}";
@@ -601,5 +595,9 @@ bool AppConfig::removeDirectory(QString dirName)
 
 void AppConfig::mSleep(int mSecond)
 {
+#if defined(WIN32)
     Sleep(mSecond);
+#else
+    usleep(mSeconds * 1000);
+#endif
 }

+ 2 - 2
src/Widget/ShowVideoWidget.cpp

@@ -1,6 +1,6 @@
 
-#include "showVideoWidget.h"
-#include "ui_showVideoWidget.h"
+#include "ShowVideoWidget.h"
+#include "ui_ShowVideoWidget.h"
 
 #include <QPainter>
 #include <QDebug>