summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/util/qundostack.cpp4
-rw-r--r--src/widgets/util/qundostack.h7
-rw-r--r--src/widgets/util/util.pri15
3 files changed, 12 insertions, 14 deletions
diff --git a/src/widgets/util/qundostack.cpp b/src/widgets/util/qundostack.cpp
index fd0035962e..b371e903a6 100644
--- a/src/widgets/util/qundostack.cpp
+++ b/src/widgets/util/qundostack.cpp
@@ -44,8 +44,6 @@
#endif
#include "qundostack_p.h"
-#ifndef QT_NO_UNDOCOMMAND
-
QT_BEGIN_NAMESPACE
/*!
@@ -342,8 +340,6 @@ const QUndoCommand *QUndoCommand::child(int index) const
return d->child_list.at(index);
}
-#endif // QT_NO_UNDOCOMMAND
-
#if QT_CONFIG(undostack)
/*!
diff --git a/src/widgets/util/qundostack.h b/src/widgets/util/qundostack.h
index e402e16eae..7ab90b507a 100644
--- a/src/widgets/util/qundostack.h
+++ b/src/widgets/util/qundostack.h
@@ -44,15 +44,14 @@
#include <QtCore/qobject.h>
#include <QtCore/qstring.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(undocommand);
+QT_BEGIN_NAMESPACE
class QAction;
class QUndoCommandPrivate;
class QUndoStackPrivate;
-#ifndef QT_NO_UNDOCOMMAND
-
class Q_WIDGETS_EXPORT QUndoCommand
{
QUndoCommandPrivate *d;
@@ -83,8 +82,6 @@ private:
friend class QUndoStack;
};
-#endif // QT_NO_UNDOCOMMAND
-
#if QT_CONFIG(undostack)
class Q_WIDGETS_EXPORT QUndoStack : public QObject
diff --git a/src/widgets/util/util.pri b/src/widgets/util/util.pri
index 99a1a62887..8b28ac8bf0 100644
--- a/src/widgets/util/util.pri
+++ b/src/widgets/util/util.pri
@@ -5,15 +5,12 @@ HEADERS += \
util/qcolormap.h \
util/qcompleter.h \
util/qcompleter_p.h \
- util/qsystemtrayicon_p.h \
- util/qundostack.h \
- util/qundostack_p.h
+ util/qsystemtrayicon_p.h
SOURCES += \
util/qsystemtrayicon.cpp \
util/qcolormap.cpp \
- util/qcompleter.cpp \
- util/qundostack.cpp
+ util/qcompleter.cpp
qtConfig(scroller) {
HEADERS += \
@@ -29,6 +26,14 @@ qtConfig(scroller) {
util/qflickgesture.cpp \
}
+qtConfig(undocommand) {
+ HEADERS += \
+ util/qundostack.h \
+ util/qundostack_p.h
+
+ SOURCES += util/qundostack.cpp
+}
+
qtConfig(undogroup) {
HEADERS += util/qundogroup.h
SOURCES += util/qundogroup.cpp