forked from qt-creator/qt-creator
baseqtversion: less inverted logic
Change-Id: I3a11dbe604a5624a29164308fd69bf00b223995d Reviewed-on: http://codereview.qt-project.org/5471 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -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()
|
|||||||
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
|
|||||||
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
|
|||||||
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
|
|||||||
|
|
||||||
// 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
|
|||||||
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:
|
|||||||
|
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user