Commit 95590db0 authored by hjk's avatar hjk Committed by hjk
Browse files

baseqtversion: less inverted logic

Change-Id: I3a11dbe604a5624a29164308fd69bf00b223995d
Reviewed-on: http://codereview.qt-project.org/5471

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 08dfd0d0
...@@ -175,7 +175,7 @@ BaseQtVersion::BaseQtVersion(const QString &qmakeCommand, bool isAutodetected, c ...@@ -175,7 +175,7 @@ BaseQtVersion::BaseQtVersion(const QString &qmakeCommand, bool isAutodetected, c
m_defaultConfigIsDebug(true), m_defaultConfigIsDebug(true),
m_defaultConfigIsDebugAndRelease(true), m_defaultConfigIsDebugAndRelease(true),
m_versionInfoUpToDate(false), m_versionInfoUpToDate(false),
m_notInstalled(false), m_installed(true),
m_hasExamples(false), m_hasExamples(false),
m_hasDemos(false), m_hasDemos(false),
m_hasDocumentation(false), m_hasDocumentation(false),
...@@ -196,7 +196,7 @@ BaseQtVersion::BaseQtVersion() ...@@ -196,7 +196,7 @@ BaseQtVersion::BaseQtVersion()
m_defaultConfigIsDebug(true), m_defaultConfigIsDebug(true),
m_defaultConfigIsDebugAndRelease(true), m_defaultConfigIsDebugAndRelease(true),
m_versionInfoUpToDate(false), m_versionInfoUpToDate(false),
m_notInstalled(false), m_installed(true),
m_hasExamples(false), m_hasExamples(false),
m_hasDemos(false), m_hasDemos(false),
m_hasDocumentation(false), m_hasDocumentation(false),
...@@ -297,7 +297,7 @@ bool BaseQtVersion::isValid() const ...@@ -297,7 +297,7 @@ bool BaseQtVersion::isValid() const
updateMkspec(); updateMkspec();
return !qmakeCommand().isEmpty() return !qmakeCommand().isEmpty()
&& !m_notInstalled && m_installed
&& m_versionInfo.contains("QT_INSTALL_BINS") && m_versionInfo.contains("QT_INSTALL_BINS")
&& !m_mkspecFullPath.isEmpty() && !m_mkspecFullPath.isEmpty()
&& m_qmakeIsExecutable; && m_qmakeIsExecutable;
...@@ -311,7 +311,7 @@ QString BaseQtVersion::invalidReason() const ...@@ -311,7 +311,7 @@ QString BaseQtVersion::invalidReason() const
return QCoreApplication::translate("QtVersion", "No qmake path set"); return QCoreApplication::translate("QtVersion", "No qmake path set");
if (!m_qmakeIsExecutable) if (!m_qmakeIsExecutable)
return QCoreApplication::translate("QtVersion", "qmake does not exist or is not executable"); return QCoreApplication::translate("QtVersion", "qmake does not exist or is not executable");
if (m_notInstalled) if (!m_installed)
return QCoreApplication::translate("QtVersion", "Qt version is not properly installed, please run make install"); return QCoreApplication::translate("QtVersion", "Qt version is not properly installed, please run make install");
if (!m_versionInfo.contains("QT_INSTALL_BINS")) if (!m_versionInfo.contains("QT_INSTALL_BINS"))
return QCoreApplication::translate("QtVersion", return QCoreApplication::translate("QtVersion",
...@@ -745,7 +745,7 @@ void BaseQtVersion::updateVersionInfo() const ...@@ -745,7 +745,7 @@ void BaseQtVersion::updateVersionInfo() const
// extract data from qmake executable // extract data from qmake executable
m_versionInfo.clear(); m_versionInfo.clear();
m_notInstalled = false; m_installed = true;
m_hasExamples = false; m_hasExamples = false;
m_hasDocumentation = false; m_hasDocumentation = false;
m_hasDebuggingHelper = false; m_hasDebuggingHelper = false;
...@@ -777,12 +777,12 @@ void BaseQtVersion::updateVersionInfo() const ...@@ -777,12 +777,12 @@ void BaseQtVersion::updateVersionInfo() const
if (m_versionInfo.contains("QT_INSTALL_BINS")) { if (m_versionInfo.contains("QT_INSTALL_BINS")) {
QFileInfo fi(m_versionInfo.value("QT_INSTALL_BINS")); QFileInfo fi(m_versionInfo.value("QT_INSTALL_BINS"));
if (!fi.exists()) if (!fi.exists())
m_notInstalled = true; m_installed = false;
} }
if (m_versionInfo.contains("QT_INSTALL_HEADERS")){ if (m_versionInfo.contains("QT_INSTALL_HEADERS")){
QFileInfo fi(m_versionInfo.value("QT_INSTALL_HEADERS")); QFileInfo fi(m_versionInfo.value("QT_INSTALL_HEADERS"));
if (!fi.exists()) if (!fi.exists())
m_notInstalled = true; m_installed = false;
} }
if (m_versionInfo.contains("QT_INSTALL_DOCS")){ if (m_versionInfo.contains("QT_INSTALL_DOCS")){
QFileInfo fi(m_versionInfo.value("QT_INSTALL_DOCS")); QFileInfo fi(m_versionInfo.value("QT_INSTALL_DOCS"));
......
...@@ -256,7 +256,7 @@ private: ...@@ -256,7 +256,7 @@ private:
mutable bool m_versionInfoUpToDate; mutable bool m_versionInfoUpToDate;
mutable QHash<QString,QString> m_versionInfo; mutable QHash<QString,QString> m_versionInfo;
mutable bool m_notInstalled; mutable bool m_installed;
mutable bool m_hasExamples; mutable bool m_hasExamples;
mutable bool m_hasDemos; mutable bool m_hasDemos;
mutable bool m_hasDocumentation; mutable bool m_hasDocumentation;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment