summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidget.cpp8
-rw-r--r--src/scripttools/debugging/qscriptcompletiontask.cpp8
-rw-r--r--src/scripttools/debugging/qscriptdebugger.cpp6
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent.cpp19
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent_p.h3
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent_p_p.h6
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend.cpp2
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp4
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp5
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp8
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp18
-rw-r--r--src/scripttools/debugging/qscriptedit.cpp10
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.h4
-rw-r--r--tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h4
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.h4
-rw-r--r--tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h4
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.h6
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp7
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h4
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.cpp27
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.h4
-rw-r--r--tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qttreepropertybrowser.h4
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.cpp8
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.h4
29 files changed, 0 insertions, 197 deletions
diff --git a/src/scripttools/debugging/qscriptbreakpointswidget.cpp b/src/scripttools/debugging/qscriptbreakpointswidget.cpp
index aea1fe7..efb3047 100644
--- a/src/scripttools/debugging/qscriptbreakpointswidget.cpp
+++ b/src/scripttools/debugging/qscriptbreakpointswidget.cpp
@@ -225,7 +225,6 @@ public:
bool eventFilter(QObject *editor, QEvent *event)
{
-#if QT_VERSION >= 0x040500
if (QLineEdit *le = qobject_cast<QLineEdit*>(editor)) {
if (event->type() == QEvent::KeyPress) {
int key = static_cast<QKeyEvent*>(event)->key();
@@ -237,21 +236,18 @@ public:
}
}
}
-#endif
return QStyledItemDelegate::eventFilter(editor, event);
}
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
-#if QT_VERSION >= 0x040500
if (index.column() == 2) {
// check that the syntax is OK
QString condition = qobject_cast<QLineEdit*>(editor)->text();
if (QScriptEngine::checkSyntax(condition).state() != QScriptSyntaxCheckResult::Valid)
return;
}
-#endif
QStyledItemDelegate::setModelData(editor, model, index);
}
@@ -261,11 +257,7 @@ private Q_SLOTS:
QWidget *editor = qobject_cast<QWidget*>(sender());
QPalette pal = editor->palette();
QColor col;
-#if QT_VERSION >= 0x040500
bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid);
-#else
- bool ok = true;
-#endif
if (ok) {
col = Qt::white;
} else {
diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp
index 3767505..119b96a 100644
--- a/src/scripttools/debugging/qscriptcompletiontask.cpp
+++ b/src/scripttools/debugging/qscriptcompletiontask.cpp
@@ -162,11 +162,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression()
obj = ctx->thisObject();
} else {
QScriptValueList scopeChain;
-#if QT_VERSION >= 0x040500
scopeChain = ctx->scopeChain();
-#else
- scopeChain.append(ctx->activationObject());
-#endif
for (int i = 0; i < scopeChain.size(); ++i) {
QScriptValue oo = scopeChain.at(i).property(topLevelIdent);
if (oo.isObject()) {
@@ -180,11 +176,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression()
if (obj.isValid())
objects.append(obj);
} else {
-#if QT_VERSION >= 0x040500
objects << ctx->scopeChain();
-#else
- objects.append(ctx->activationObject());
-#endif
QStringList keywords;
keywords.append(QString::fromLatin1("this"));
keywords.append(QString::fromLatin1("true"));
diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp
index 5a356ae..ce43572 100644
--- a/src/scripttools/debugging/qscriptdebugger.cpp
+++ b/src/scripttools/debugging/qscriptdebugger.cpp
@@ -663,11 +663,7 @@ QString QScriptDebuggerPrivate::toolTip(int frameIndex, int lineNumber,
objects.append(ctx->thisObject());
++pathIndex;
} else {
-#if QT_VERSION >= 0x040500
objects << ctx->scopeChain();
-#else
- objects.append(ctx->activationObject());
-#endif
}
for (int i = 0; i < objects.size(); ++i) {
QScriptValue val = objects.at(i);
@@ -991,13 +987,11 @@ public:
qint64 scriptId = m_added.at(m_index);
m_debugger->scriptsModel->addScript(scriptId, data);
-#if QT_VERSION >= 0x040500
// ### could be slow, might want to do this in a separate thread
QString xml = qt_scriptToXml(data.contents(), data.baseLineNumber());
QScriptXmlParser::Result extraInfo = QScriptXmlParser::parse(xml);
m_debugger->scriptsModel->addExtraScriptInfo(
scriptId, extraInfo.functionsInfo, extraInfo.executableLineNumbers);
-#endif
if (++m_index < m_added.size())
frontend.scheduleGetScriptData(m_added.at(m_index));
diff --git a/src/scripttools/debugging/qscriptdebuggeragent.cpp b/src/scripttools/debugging/qscriptdebuggeragent.cpp
index fcba033..0ea9c99 100644
--- a/src/scripttools/debugging/qscriptdebuggeragent.cpp
+++ b/src/scripttools/debugging/qscriptdebuggeragent.cpp
@@ -88,16 +88,9 @@ QScriptDebuggerAgentPrivate *QScriptDebuggerAgentPrivate::get(
*/
QScriptDebuggerAgent::QScriptDebuggerAgent(
QScriptDebuggerBackendPrivate *backend, QScriptEngine *engine)
-#if QT_VERSION >= 0x040500
: QScriptEngineAgent(*new QScriptDebuggerAgentPrivate, engine)
-#else
- : QScriptEngineAgent(engine), d_ptr(new QScriptDebuggerAgentPrivate)
-#endif
{
Q_D(QScriptDebuggerAgent);
-#if QT_VERSION < 0x040500
- d_ptr->q_ptr = this;
-#endif
d->backend = backend;
QScriptContext *ctx = engine->currentContext();
@@ -117,9 +110,6 @@ QScriptDebuggerAgent::~QScriptDebuggerAgent()
Q_D(QScriptDebuggerAgent);
if (d->backend)
d->backend->agentDestroyed(this);
-#if QT_VERSION < 0x040500
- delete d_ptr;
-#endif
}
/*!
@@ -712,12 +702,7 @@ void QScriptDebuggerAgent::exceptionCatch(qint64 scriptId,
*/
bool QScriptDebuggerAgent::supportsExtension(Extension extension) const
{
-#if QT_VERSION >= 0x040500
return (extension == DebuggerInvocationRequest);
-#else
- Q_UNUSED(extension);
- return false;
-#endif
}
/*!
@@ -727,7 +712,6 @@ QVariant QScriptDebuggerAgent::extension(Extension extension,
const QVariant &argument)
{
Q_UNUSED(extension);
-#if QT_VERSION >= 0x040500
Q_D(QScriptDebuggerAgent);
Q_ASSERT(extension == DebuggerInvocationRequest);
QVariantList lst = argument.toList();
@@ -739,9 +723,6 @@ QVariant QScriptDebuggerAgent::extension(Extension extension,
d->backend->debuggerInvocationRequest(
scriptId, lineNumber, columnNumber);
}
-#else
- Q_UNUSED(argument);
-#endif
return QVariant();
}
diff --git a/src/scripttools/debugging/qscriptdebuggeragent_p.h b/src/scripttools/debugging/qscriptdebuggeragent_p.h
index 556b17b..28ec46a 100644
--- a/src/scripttools/debugging/qscriptdebuggeragent_p.h
+++ b/src/scripttools/debugging/qscriptdebuggeragent_p.h
@@ -125,9 +125,6 @@ public:
const QVariant &argument = QVariant());
private:
-#if QT_VERSION < 0x040500
- QScriptDebuggerAgentPrivate *d_ptr;
-#endif
Q_DECLARE_PRIVATE(QScriptDebuggerAgent)
Q_DISABLE_COPY(QScriptDebuggerAgent)
};
diff --git a/src/scripttools/debugging/qscriptdebuggeragent_p_p.h b/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
index cf6fd1a..313b1c0 100644
--- a/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
+++ b/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
@@ -68,9 +68,7 @@ QT_BEGIN_NAMESPACE
class QScriptDebuggerAgent;
class QScriptDebuggerAgentPrivate
-#if QT_VERSION >= 0x040500
: public QScriptEngineAgentPrivate
-#endif
{
Q_DECLARE_PUBLIC(QScriptDebuggerAgent)
public:
@@ -125,10 +123,6 @@ public:
int statementCounter;
QScriptDebuggerBackendPrivate *backend;
-
-#if QT_VERSION < 0x040500
- QScriptDebuggerAgent *q_ptr;
-#endif
};
QT_END_NAMESPACE
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
index 24a3847..3c29130 100644
--- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
@@ -615,13 +615,11 @@ void QScriptDebuggerBackend::doPendingEvaluate(bool postEvent)
// push a new context and initialize its scope chain etc.
{
QScriptContext *evalContext = engine()->pushContext();
-#if QT_VERSION >= 0x040500
QScriptValueList scopeChain = ctx->scopeChain();
if (scopeChain.isEmpty())
scopeChain.append(engine()->globalObject());
while (!scopeChain.isEmpty())
evalContext->pushScope(scopeChain.takeLast());
-#endif
evalContext->setActivationObject(ctx->activationObject());
evalContext->setThisObject(ctx->thisObject());
}
diff --git a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp
index e36386d..1be8c5f 100644
--- a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp
+++ b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp
@@ -287,13 +287,9 @@ QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute(
QScriptContext *ctx = backend->context(command.contextIndex());
if (ctx) {
QScriptDebuggerValueList dest;
-#if QT_VERSION >= 0x040500
QScriptValueList src = ctx->scopeChain();
for (int i = 0; i < src.size(); ++i)
dest.append(src.at(i));
-#else
- dest.append(ctx->activationObject());
-#endif
response.setResult(dest);
} else {
response.setError(QScriptDebuggerResponse::InvalidContextIndex);
diff --git a/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp b/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp
index 0018b92..f923508 100644
--- a/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp
@@ -448,12 +448,7 @@ QStringList QScriptDebuggerConsoleGlobalObject::getCommandCompletions(const QStr
bool QScriptDebuggerConsoleGlobalObject::checkSyntax(const QString &program)
{
-#if QT_VERSION >= 0x040500
return (QScriptEngine::checkSyntax(program).state() == QScriptSyntaxCheckResult::Valid);
-#else
- Q_UNUSED(program);
- return true;
-#endif
}
void QScriptDebuggerConsoleGlobalObject::setEvaluateAction(int action)
diff --git a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
index a4919be..60fe48d 100644
--- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
@@ -206,11 +206,7 @@ private Q_SLOTS:
QWidget *editor = qobject_cast<QWidget*>(sender());
QPalette pal = editor->palette();
QColor col;
-#if QT_VERSION >= 0x040500
bool ok = (QScriptEngine::checkSyntax(text).state() == QScriptSyntaxCheckResult::Valid);
-#else
- bool ok = true;
-#endif
if (ok) {
col = Qt::white;
} else {
@@ -277,12 +273,10 @@ bool QScriptDebuggerLocalsItemDelegate::eventFilter(QObject *watched, QEvent *ev
return QStyledItemDelegate::eventFilter(watched, event);
QKeyEvent *ke = static_cast<QKeyEvent*>(event);
if ((ke->key() == Qt::Key_Enter) || (ke->key() == Qt::Key_Return)) {
-#if QT_VERSION >= 0x040500
if (QScriptEngine::checkSyntax(le->text()).state() != QScriptSyntaxCheckResult::Valid) {
// ignore when script contains syntax error
return true;
}
-#endif
}
if (ke->key() != Qt::Key_Tab)
return QStyledItemDelegate::eventFilter(watched, event);
@@ -296,14 +290,12 @@ void QScriptDebuggerLocalsItemDelegate::setModelData(
QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
{
-#if QT_VERSION >= 0x040500
if (index.column() == 1) {
// check that the syntax is OK
QString expression = qobject_cast<QLineEdit*>(editor)->text();
if (QScriptEngine::checkSyntax(expression).state() != QScriptSyntaxCheckResult::Valid)
return;
}
-#endif
QStyledItemDelegate::setModelData(editor, model, index);
}
diff --git a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
index 20350f6..fa30d84 100644
--- a/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp
@@ -410,11 +410,7 @@ void QScriptDebuggerScriptedConsoleCommandJob::start()
for (int i = 0; i < d->arguments.size(); ++i)
args.append(QScriptValue(engine, d->arguments.at(i)));
QScriptDebuggerConsoleGlobalObject *global;
-#if QT_VERSION >= 0x040500
global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject());
-#else
- global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().scope().toQObject());
-#endif
Q_ASSERT(global != 0);
global->setScheduler(this);
global->setResponseHandler(this);
@@ -444,11 +440,7 @@ void QScriptDebuggerScriptedConsoleCommandJob::handleResponse(
args.append(qScriptValueFromValue(engine, response));
args.append(QScriptValue(engine, commandId));
QScriptDebuggerConsoleGlobalObject *global;
-#if QT_VERSION >= 0x040500
global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().toQObject());
-#else
- global = qobject_cast<QScriptDebuggerConsoleGlobalObject*>(engine->globalObject().scope().toQObject());
-#endif
Q_ASSERT(global != 0);
global->setScheduler(this);
global->setResponseHandler(this);
@@ -566,12 +558,7 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
QScriptDebuggerConsoleGlobalObject *cppGlobal = new QScriptDebuggerConsoleGlobalObject();
QScriptValue global = engine->newQObject(cppGlobal,
QScriptEngine::ScriptOwnership,
-#if QT_VERSION >= 0x040500
QScriptEngine::ExcludeSuperClassContents);
-#else
- QScriptEngine::ExcludeSuperClassMethods
- | QScriptEngine::ExcludeSuperClassProperties);
-#endif
{
QScriptValueIterator it(engine->globalObject());
while (it.hasNext()) {
@@ -579,12 +566,7 @@ QScriptDebuggerScriptedConsoleCommand *QScriptDebuggerScriptedConsoleCommand::pa
global.setProperty(it.scriptName(), it.value(), it.flags());
}
}
-#if QT_VERSION >= 0x040500
engine->setGlobalObject(global);
-#else
- engine->globalObject().setScope(global);
- global = engine->globalObject();
-#endif
cppGlobal->setMessageHandler(messageHandler);
QScriptValue ret = engine->evaluate(program, fileName);
diff --git a/src/scripttools/debugging/qscriptedit.cpp b/src/scripttools/debugging/qscriptedit.cpp
index 2bc0a40..7c2a72c 100644
--- a/src/scripttools/debugging/qscriptedit.cpp
+++ b/src/scripttools/debugging/qscriptedit.cpp
@@ -342,11 +342,9 @@ void QScriptEdit::extraAreaPaintEvent(QPaintEvent *e)
icon.paint(&painter, r, Qt::AlignCenter);
}
-#if QT_VERSION >= 0x040500
if (!m_executableLineNumbers.contains(lineNumber))
painter.setPen(pal.color(QPalette::Mid));
else
-#endif
painter.setPen(QColor(Qt::darkCyan));
QString number = QString::number(lineNumber);
painter.drawText(rect.x() + markWidth, (int)top, rect.x() + extraAreaWidth - markWidth - 4,
@@ -370,10 +368,8 @@ void QScriptEdit::extraAreaMouseEvent(QMouseEvent *e)
if (e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking
bool hand = (e->pos().x() <= markWidth);
-#if QT_VERSION >= 0x040500
int lineNumber = cursor.blockNumber() + m_baseLineNumber;
hand = hand && m_executableLineNumbers.contains(lineNumber);
-#endif
#ifndef QT_NO_CURSOR
if (hand != (m_extraArea->cursor().shape() == Qt::PointingHandCursor))
m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor);
@@ -382,12 +378,8 @@ void QScriptEdit::extraAreaMouseEvent(QMouseEvent *e)
if (e->type() == QEvent::MouseButtonPress) {
if (e->button() == Qt::LeftButton) {
-#if QT_VERSION >= 0x040500
int lineNumber = cursor.blockNumber() + m_baseLineNumber;
bool executable = m_executableLineNumbers.contains(lineNumber);
-#else
- bool executable = true;
-#endif
if ((e->pos().x() <= markWidth) && executable)
m_extraAreaToggleBlockNumber = cursor.blockNumber();
else
@@ -402,10 +394,8 @@ void QScriptEdit::extraAreaMouseEvent(QMouseEvent *e)
}
} else if (e->button() == Qt::RightButton) {
int lineNumber = cursor.blockNumber() + m_baseLineNumber;
-#if QT_VERSION >= 0x040500
if (!m_executableLineNumbers.contains(lineNumber))
return;
-#endif
bool has = m_breakpoints.contains(lineNumber);
QMenu *popup = new QMenu();
QAction *toggleAct = new QAction(QObject::tr("Toggle Breakpoint"), popup);
diff --git a/src/scripttools/debugging/qscriptenginedebugger.h b/src/scripttools/debugging/qscriptenginedebugger.h
index d5e127f..a4853f0 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.h
+++ b/src/scripttools/debugging/qscriptenginedebugger.h
@@ -48,11 +48,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-#if QT_VERSION >= 0x040500
QT_MODULE(ScriptTools)
-#else
-# define Q_SCRIPTTOOLS_EXPORT
-#endif
class QAction;
class QScriptEngine;
diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp
index ecdaf16..09394e7 100644
--- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp
+++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp
@@ -48,9 +48,7 @@
#include <QtGui/QToolButton>
#include <QtGui/QStyle>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtButtonPropertyBrowserPrivate
{
@@ -626,8 +624,6 @@ bool QtButtonPropertyBrowser::isExpanded(QtBrowserItem *item) const
return false;
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qtbuttonpropertybrowser.cpp"
diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h
index 0833c2d..0238f5c 100644
--- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h
+++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h
@@ -44,9 +44,7 @@
#include "qtpropertybrowser.h"
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtButtonPropertyBrowserPrivate;
@@ -82,8 +80,6 @@ private:
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif
diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.cpp b/tools/shared/qtpropertybrowser/qteditorfactory.cpp
index 3e9336f..a2e3917 100644
--- a/tools/shared/qtpropertybrowser/qteditorfactory.cpp
+++ b/tools/shared/qtpropertybrowser/qteditorfactory.cpp
@@ -62,9 +62,7 @@
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
// Set a hard coded left margin to account for the indentation
// of the tree view icon when switching to an editor
@@ -2583,9 +2581,7 @@ void QtFontEditorFactory::disconnectPropertyManager(QtFontPropertyManager *manag
disconnect(manager, SIGNAL(valueChanged(QtProperty*,QFont)), this, SLOT(slotPropertyChanged(QtProperty*,QFont)));
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qteditorfactory.cpp"
#include "qteditorfactory.moc"
diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.h b/tools/shared/qtpropertybrowser/qteditorfactory.h
index 044dd5e..d86f9f6 100644
--- a/tools/shared/qtpropertybrowser/qteditorfactory.h
+++ b/tools/shared/qtpropertybrowser/qteditorfactory.h
@@ -44,9 +44,7 @@
#include "qtpropertymanager.h"
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtSpinBoxFactoryPrivate;
@@ -394,8 +392,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont &))
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif
diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp
index d7c8f0b..9ac9744 100644
--- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp
+++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp
@@ -47,9 +47,7 @@
#include <QtCore/QTimer>
#include <QtCore/QMap>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtGroupBoxPropertyBrowserPrivate
{
@@ -528,8 +526,6 @@ void QtGroupBoxPropertyBrowser::itemChanged(QtBrowserItem *item)
d_ptr->propertyChanged(item);
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qtgroupboxpropertybrowser.cpp"
diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h
index 29422bd..6d1b2b1 100644
--- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h
+++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h
@@ -44,9 +44,7 @@
#include "qtpropertybrowser.h"
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtGroupBoxPropertyBrowserPrivate;
@@ -73,8 +71,6 @@ private:
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp
index 7254245..cca082d 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp
@@ -48,9 +48,7 @@
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtPropertyPrivate
{
@@ -1958,8 +1956,6 @@ void QtAbstractPropertyBrowser::setCurrentItem(QtBrowserItem *item)
emit currentItemChanged(item);
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qtpropertybrowser.cpp"
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.h b/tools/shared/qtpropertybrowser/qtpropertybrowser.h
index 649a9e3..20ffb81 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowser.h
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.h
@@ -45,11 +45,7 @@
#include <QtGui/QWidget>
#include <QtCore/QSet>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
-
-
class QtAbstractPropertyManager;
class QtPropertyPrivate;
@@ -308,8 +304,6 @@ private:
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif // QTPROPERTYBROWSER_H
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
index d689e60..94b0285 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp
@@ -48,9 +48,7 @@
#include <QtGui/QLineEdit>
#include <QtGui/QMenu>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
QtCursorDatabase::QtCursorDatabase()
{
@@ -426,9 +424,4 @@ bool QtKeySequenceEdit::event(QEvent *e)
return QWidget::event(e);
}
-
-
-
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
index 2eab3c8..fe8c6d1 100644
--- a/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
@@ -58,9 +58,7 @@
#include <QtGui/QWidget>
#include <QtCore/QStringList>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QMouseEvent;
class QCheckBox;
@@ -154,8 +152,6 @@ private:
QLineEdit *m_lineEdit;
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif
diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
index 8b84eb9..47b8c9b 100644
--- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
+++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp
@@ -61,9 +61,7 @@
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
template <class PrivateData, class Value>
static void setSimpleMinimumData(PrivateData *data, const Value &minVal)
@@ -421,23 +419,6 @@ private:
QMetaEnum m_policyEnum;
};
-#if QT_VERSION < 0x040300
-
-static QList<QLocale::Country> countriesForLanguage(QLocale::Language language)
-{
- QList<QLocale::Country> countries;
- QLocale::Country country = QLocale::AnyCountry;
- while (country <= QLocale::LastCountry) {
- QLocale locale(language, country);
- if (locale.language() == language && !countries.contains(locale.country()))
- countries << locale.country();
- country = (QLocale::Country)((uint)country + 1); // ++country
- }
- return countries;
-}
-
-#endif
-
static QList<QLocale::Country> sortCountries(const QList<QLocale::Country> &countries)
{
QMultiMap<QString, QLocale::Country> nameToCountry;
@@ -469,11 +450,7 @@ void QtMetaEnumProvider::initLocale()
while (itLang.hasNext()) {
QLocale::Language language = itLang.next();
QList<QLocale::Country> countries;
-#if QT_VERSION < 0x040300
- countries = countriesForLanguage(language);
-#else
countries = QLocale::countriesForLanguage(language);
-#endif
if (countries.isEmpty() && language == system.language())
countries << system.country();
@@ -5789,9 +5766,7 @@ QtFontPropertyManager::QtFontPropertyManager(QObject *parent)
{
d_ptr = new QtFontPropertyManagerPrivate;
d_ptr->q_ptr = this;
-#if QT_VERSION >= 0x040500
QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged()));
-#endif
d_ptr->m_intPropertyManager = new QtIntPropertyManager(this);
connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)),
@@ -6485,9 +6460,7 @@ void QtCursorPropertyManager::uninitializeProperty(QtProperty *property)
d_ptr->m_values.remove(property);
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qtpropertymanager.cpp"
#include "qtpropertymanager.moc"
diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.h b/tools/shared/qtpropertybrowser/qtpropertymanager.h
index 90fe5c0..2fb69bf 100644
--- a/tools/shared/qtpropertybrowser/qtpropertymanager.h
+++ b/tools/shared/qtpropertybrowser/qtpropertymanager.h
@@ -44,9 +44,7 @@
#include "qtpropertybrowser.h"
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QDate;
class QTime;
@@ -743,8 +741,6 @@ private:
Q_DISABLE_COPY(QtCursorPropertyManager)
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif
diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp
index ed262e5..1ad3f6b 100644
--- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp
+++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp
@@ -52,9 +52,7 @@
#include <QtGui/QStyle>
#include <QtGui/QPalette>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtPropertyEditorView;
@@ -1040,9 +1038,7 @@ void QtTreePropertyBrowser::editItem(QtBrowserItem *item)
d_ptr->editItem(item);
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qttreepropertybrowser.cpp"
#include "qttreepropertybrowser.moc"
diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.h b/tools/shared/qtpropertybrowser/qttreepropertybrowser.h
index 63bd7f6..813e050 100644
--- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.h
+++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.h
@@ -44,9 +44,7 @@
#include "qtpropertybrowser.h"
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QTreeWidgetItem;
class QtTreePropertyBrowserPrivate;
@@ -131,8 +129,6 @@ private:
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#endif
diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
index 7e1975e..f712ba6 100644
--- a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
+++ b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
@@ -51,9 +51,7 @@
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */
#endif
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
class QtEnumPropertyType
{
@@ -69,17 +67,13 @@ class QtGroupPropertyType
{
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
Q_DECLARE_METATYPE(QtEnumPropertyType)
Q_DECLARE_METATYPE(QtFlagPropertyType)
Q_DECLARE_METATYPE(QtGroupPropertyType)
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
/*!
Returns the type id for an enum property.
@@ -2275,8 +2269,6 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager
d_ptr->m_checkBoxFactory->removePropertyManager(itFlag.next()->subBoolPropertyManager());
}
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
#include "moc_qtvariantproperty.cpp"
diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.h b/tools/shared/qtpropertybrowser/qtvariantproperty.h
index 91397d8..9253809 100644
--- a/tools/shared/qtpropertybrowser/qtvariantproperty.h
+++ b/tools/shared/qtpropertybrowser/qtvariantproperty.h
@@ -46,9 +46,7 @@
#include <QtCore/QVariant>
#include <QtGui/QIcon>
-#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
-#endif
typedef QMap<int, QIcon> QtIconMap;
@@ -172,9 +170,7 @@ private:
Q_DISABLE_COPY(QtVariantEditorFactory)
};
-#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
-#endif
Q_DECLARE_METATYPE(QIcon)
Q_DECLARE_METATYPE(QtIconMap)