forked from qt-creator/qt-creator
Remove Qt version checks.
Qt 5.3 is the minimum requirement these days. Remove all fallback code from sources and project files. Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -248,13 +248,8 @@ CppComponentValue::CppComponentValue(FakeMetaObject::ConstPtr metaObject, const
|
||||
|
||||
CppComponentValue::~CppComponentValue()
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
delete m_metaSignatures.load();
|
||||
delete m_signalScopes.load();
|
||||
#else
|
||||
delete m_metaSignatures;
|
||||
delete m_signalScopes;
|
||||
#endif
|
||||
}
|
||||
|
||||
static QString generatedSlotName(const QString &base)
|
||||
@@ -292,11 +287,7 @@ void CppComponentValue::processMembers(MemberProcessor *processor) const
|
||||
QSet<QString> explicitSignals;
|
||||
|
||||
// make MetaFunction instances lazily when first needed
|
||||
#if QT_VERSION >= 0x050000
|
||||
QList<const Value *> *signatures = m_metaSignatures.load();
|
||||
#else
|
||||
QList<const Value *> *signatures = m_metaSignatures;
|
||||
#endif
|
||||
if (!signatures) {
|
||||
signatures = new QList<const Value *>;
|
||||
signatures->reserve(m_metaObject->methodCount());
|
||||
@@ -304,11 +295,7 @@ void CppComponentValue::processMembers(MemberProcessor *processor) const
|
||||
signatures->append(new Internal::MetaFunction(m_metaObject->method(index), valueOwner()));
|
||||
if (!m_metaSignatures.testAndSetOrdered(0, signatures)) {
|
||||
delete signatures;
|
||||
#if QT_VERSION >= 0x050000
|
||||
signatures = m_metaSignatures.load();
|
||||
#else
|
||||
signatures = m_metaSignatures;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,11 +523,7 @@ const QmlEnumValue *CppComponentValue::getEnumValue(const QString &typeName, con
|
||||
|
||||
const ObjectValue *CppComponentValue::signalScope(const QString &signalName) const
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
QHash<QString, const ObjectValue *> *scopes = m_signalScopes.load();
|
||||
#else
|
||||
QHash<QString, const ObjectValue *> *scopes = m_signalScopes;
|
||||
#endif
|
||||
if (!scopes) {
|
||||
scopes = new QHash<QString, const ObjectValue *>;
|
||||
// usually not all methods are signals
|
||||
@@ -566,11 +549,7 @@ const ObjectValue *CppComponentValue::signalScope(const QString &signalName) con
|
||||
}
|
||||
if (!m_signalScopes.testAndSetOrdered(0, scopes)) {
|
||||
delete scopes;
|
||||
#if QT_VERSION >= 0x050000
|
||||
scopes = m_signalScopes.load();
|
||||
#else
|
||||
scopes = m_signalScopes;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,10 +120,8 @@ ModelManagerInterface::ModelManagerInterface(QObject *parent)
|
||||
|
||||
m_defaultProjectInfo.qtImportsPath = QFileInfo(
|
||||
QLibraryInfo::location(QLibraryInfo::ImportsPath)).canonicalFilePath();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
m_defaultProjectInfo.qtQmlPath = QFileInfo(
|
||||
QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath();
|
||||
#endif
|
||||
|
||||
m_defaultImportPaths << environmentImportPaths();
|
||||
updateImportPaths();
|
||||
|
||||
@@ -262,11 +262,7 @@ static void printParseWarnings(const QString &libraryPath, const QString &warnin
|
||||
static QString qmlPluginDumpErrorMessage(QProcess *process)
|
||||
{
|
||||
QString errorMessage;
|
||||
#if QT_VERSION >= 0x050000
|
||||
const QString binary = QDir::toNativeSeparators(process->program());
|
||||
#else
|
||||
const QString binary = QLatin1String("qmlplugindump");
|
||||
#endif
|
||||
switch (process->error()) {
|
||||
case QProcess::FailedToStart:
|
||||
errorMessage = PluginDumper::tr("\"%1\" failed to start: %2").arg(binary, process->errorString());
|
||||
@@ -286,9 +282,7 @@ static QString qmlPluginDumpErrorMessage(QProcess *process)
|
||||
errorMessage = PluginDumper::tr("\"%1\" returned exit code %2.").arg(binary).arg(process->exitCode());
|
||||
break;
|
||||
}
|
||||
#if QT_VERSION >= 0x050000
|
||||
errorMessage += QLatin1Char('\n') + PluginDumper::tr("Arguments: %1").arg(process->arguments().join(QLatin1Char(' ')));
|
||||
#endif
|
||||
if (process->error() != QProcess::FailedToStart) {
|
||||
const QString stdErr = QString::fromLocal8Bit(process->readAllStandardError());
|
||||
if (!stdErr.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user