OSDN Git Service

Qt4Project: Don't show a error on initial building
authordt <qtc-committer@nokia.com>
Fri, 25 Mar 2011 16:20:27 +0000 (17:20 +0100)
committerdt <qtc-committer@nokia.com>
Fri, 25 Mar 2011 16:22:04 +0000 (17:22 +0100)
src/plugins/qt4projectmanager/makestep.cpp
src/plugins/qt4projectmanager/makestep.h

index 4c6c084..6b058fe 100644 (file)
@@ -171,17 +171,17 @@ bool MakeStep::init()
         if(!makefile.isEmpty()) {
             Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
             Utils::QtcProcess::addArg(&args, makefile);
-            m_makeFileExists = QDir(workingDirectory).exists(makefile);
+            m_makeFileToCheck = QDir(workingDirectory).filePath(makefile);
         } else {
-            m_makeFileExists = QDir(workingDirectory).exists("Makefile");
+            m_makeFileToCheck = QDir(workingDirectory).filePath("Makefile");
         }
     } else {
         if (!bc->makefile().isEmpty()) {
             Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
             Utils::QtcProcess::addArg(&args, bc->makefile());
-            m_makeFileExists = QDir(workingDirectory).exists(bc->makefile());
+            m_makeFileToCheck = QDir(workingDirectory).filePath(bc->makefile());
         } else {
-            m_makeFileExists = QDir(workingDirectory).exists("Makefile");
+            m_makeFileToCheck = QDir(workingDirectory).filePath("Makefile");
         }
     }
 
@@ -224,7 +224,7 @@ void MakeStep::run(QFutureInterface<bool> & fi)
         return;
     }
 
-    if (!m_makeFileExists) {
+    if (!QFileInfo(m_makeFileToCheck).exists()) {
         if (!m_clean)
             emit addOutput(tr("Makefile not found. Please check your build settings"), BuildStep::MessageOutput);
         fi.reportResult(m_clean);
index 6a5a030..74be8b8 100644 (file)
@@ -115,7 +115,7 @@ protected:
 private:
     void ctor();
     bool m_clean;
-    bool m_makeFileExists;
+    QString m_makeFileToCheck;
     QString m_userArgs;
     QString m_makeCmd;
     QList<ProjectExplorer::Task> m_tasks;