Rev. | efeab20e689880041b1ce76d479bb22c776d3f74 |
---|---|
Size | 48,626 bytes |
Time | 2020-07-04 19:41:12 |
Author | simphone |
Log Message | simphone 0.8.1 |
diff -urb qtbase/config.tests/unix/compile.test qtbase/config.tests/unix/compile.test
--- qtbase/config.tests/unix/compile.test
+++ qtbase/config.tests/unix/compile.test
@@ -21,6 +21,9 @@
while [ "$#" -gt 0 ]; do
PARAM=$1
case $PARAM in
+ -Wl,*)
+ shift
+ ;;
-config)
QMAKE_CONFIG="$QMAKE_CONFIG $2"
shift
diff -urb qtbase/configure qtbase/configure
--- qtbase/configure
+++ qtbase/configure
@@ -6755,7 +6755,7 @@
#define QT_VERSION_MAJOR $QT_MAJOR_VERSION
#define QT_VERSION_MINOR $QT_MINOR_VERSION
#define QT_VERSION_PATCH $QT_PATCH_VERSION
-#define QT_VERSION_STR "$QT_VERSION"
+#define QT_VERSION_STR "$QT_VERSION-sim"
EOF
diff -urb qtbase/mkspecs/common/gcc-base.conf qtbase/mkspecs/common/gcc-base.conf
--- qtbase/mkspecs/common/gcc-base.conf
+++ qtbase/mkspecs/common/gcc-base.conf
@@ -34,7 +34,7 @@
QMAKE_CFLAGS_OPTIMIZE = -O2
QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
-QMAKE_CFLAGS += -pipe
+QMAKE_CFLAGS += -pipe -ffunction-sections -fdata-sections
QMAKE_CFLAGS_DEPS += -M
QMAKE_CFLAGS_WARN_ON += -Wall -W
QMAKE_CFLAGS_WARN_OFF += -w
diff -urb qtbase/mkspecs/features/qt_module.prf qtbase/mkspecs/features/qt_module.prf
--- qtbase/mkspecs/features/qt_module.prf
+++ qtbase/mkspecs/features/qt_module.prf
@@ -99,7 +99,7 @@
QT += $$QT_FOR_PRIVATE
unset(QT_FOR_PRIVATE)
-!internal_module:CONFIG += create_cmake
+#!internal_module:CONFIG += create_cmake
contains(TARGET, QtAddOn.*): \
DEFINES += QT_BUILD_ADDON_$${ucmodule}_LIB
diff -urb qtbase/mkspecs/features/qt.prf qtbase/mkspecs/features/qt.prf
--- qtbase/mkspecs/features/qt.prf
+++ qtbase/mkspecs/features/qt.prf
@@ -8,7 +8,8 @@
QMAKE_DLL_PATHS += $$[QT_INSTALL_BINS/get]
}
}
-CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
+DEFINES += QT_NO_UNSHARABLE_CONTAINERS
+CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG QT_NO_DEBUG_OUTPUT QT_NO_INFO_OUTPUT QT_NO_WARNING_OUTPUT
contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
no_keywords:DEFINES += QT_NO_KEYWORDS
plugin { #Qt plugins
diff -urb qtbase/mkspecs/linux-g++/qmake.conf qtbase/mkspecs/linux-g++/qmake.conf
--- qtbase/mkspecs/linux-g++/qmake.conf
+++ qtbase/mkspecs/linux-g++/qmake.conf
@@ -6,6 +6,8 @@
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_LFLAGS += -Wl,--gc-sections
+
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
diff -urb qtbase/mkspecs/macx-g++/qmake.conf qtbase/mkspecs/macx-g++/qmake.conf
--- qtbase/mkspecs/macx-g++/qmake.conf
+++ qtbase/mkspecs/macx-g++/qmake.conf
@@ -10,6 +10,8 @@
CONFIG += app_bundle incremental global_init_link_order lib_version_first
QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_LFLAGS += -dead_strip
+
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
diff -urb /dev/null qtbase/mkspecs/openbsd-eg++/qmake.conf
--- /dev/null
+++ qtbase/mkspecs/openbsd-eg++/qmake.conf
@@ -0,0 +1,47 @@
+#
+# qmake configuration for openbsd-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+QMAKE_PLATFORM = openbsd
+
+include(../common/bsd/bsd.conf)
+
+# Addon software goes into /usr/local on OpenBSD, by default we will look there
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+
+# System provided X11 defaults to X11R6 path on OpenBSD
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_RPATHDIR += $$QMAKE_LIBDIR_X11
+
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+
+# System compiler is gcc 4.2.1 up to OpenBSD 6.0.
+# For proper C++11 support, we need to use a newer gcc from ports/packages,
+# where compiler commands are renamed to egcc/eg++. Therefore, redefine
+# mkspecs/common/g++-base.conf compiler commands
+QMAKE_CC = egcc
+
+QMAKE_LINK_C = $$QMAKE_CC
+QMAKE_LINK_C_SHLIB = $$QMAKE_CC
+
+QMAKE_CXX = eg++
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+
+# Reset g++-unix.conf's NOUNDEF flags as OpenBSD libc can't handle environ
+QMAKE_LFLAGS_NOUNDEF =
+
+
+# /usr/bin/ld.lld may fail so use /usr/bin/ld.bfd
+QMAKE_LFLAGS += -fuse-ld=bfd
+
+load(qt_config)
diff -urb /dev/null qtbase/mkspecs/openbsd-eg++/qplatformdefs.h
--- /dev/null
+++ qtbase/mkspecs/openbsd-eg++/qplatformdefs.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#include "../common/bsd/qplatformdefs.h"
+
+#endif // QPLATFORMDEFS_H
diff -urb qtbase/mkspecs/win32-g++/qmake.conf qtbase/mkspecs/win32-g++/qmake.conf
--- qtbase/mkspecs/win32-g++/qmake.conf
+++ qtbase/mkspecs/win32-g++/qmake.conf
@@ -26,7 +26,7 @@
QMAKE_LEXFLAGS =
QMAKE_YACC = bison -y
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport -ffunction-sections -fdata-sections
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -w
@@ -78,8 +78,8 @@
QMAKE_LFLAGS =
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
QMAKE_LFLAGS_EXCEPTIONS_OFF =
-QMAKE_LFLAGS_RELEASE = -Wl,-s
-QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_RELEASE = -Wl,-g -static -static-libgcc -static-libstdc++
+QMAKE_LFLAGS_DEBUG = -Wl,-g
QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
QMAKE_LFLAGS_DLL = -shared
diff -urb qtbase/src/corelib/codecs/qwindowscodec.cpp qtbase/src/corelib/codecs/qwindowscodec.cpp
--- qtbase/src/corelib/codecs/qwindowscodec.cpp
+++ qtbase/src/corelib/codecs/qwindowscodec.cpp
@@ -31,6 +31,8 @@
**
****************************************************************************/
+#ifndef QT_NO_TEXTCODEC
+
#include "qwindowscodec_p.h"
#include <qvarlengtharray.h>
#include <qstring.h>
@@ -234,3 +236,5 @@
}
QT_END_NAMESPACE
+
+#endif
diff -urb qtbase/src/corelib/global/qfeatures.txt qtbase/src/corelib/global/qfeatures.txt
--- qtbase/src/corelib/global/qfeatures.txt
+++ qtbase/src/corelib/global/qfeatures.txt
@@ -323,7 +323,7 @@
Feature: BUTTONGROUP
Description: Supports organizing groups of button widgets.
Section: Widgets
-Requires: GROUPBOX
+Requires:
Name: QButtonGroup
Feature: MAINWINDOW
diff -urb qtbase/src/corelib/global/qlogging.cpp qtbase/src/corelib/global/qlogging.cpp
--- qtbase/src/corelib/global/qlogging.cpp
+++ qtbase/src/corelib/global/qlogging.cpp
@@ -1398,6 +1398,7 @@
if (timeFormat == QLatin1String("process")) {
quint64 ms = pattern->timer.elapsed();
message.append(QString::asprintf("%6d.%03d", uint(ms / 1000), uint(ms % 1000)));
+#ifndef QT_NO_TEXTDATE
} else if (timeFormat == QLatin1String("boot")) {
// just print the milliseconds since the elapsed timer reference
// like the Linux kernel does
@@ -1409,6 +1410,7 @@
message.append(QDateTime::currentDateTime().toString(Qt::ISODate));
} else {
message.append(QDateTime::currentDateTime().toString(timeFormat));
+#endif
}
#endif
} else if (token == ifCategoryTokenC) {
diff -urb qtbase/src/corelib/io/qfilesystemiterator_win.cpp qtbase/src/corelib/io/qfilesystemiterator_win.cpp
--- qtbase/src/corelib/io/qfilesystemiterator_win.cpp
+++ qtbase/src/corelib/io/qfilesystemiterator_win.cpp
@@ -39,6 +39,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_FILESYSTEMITERATOR
+
bool done = true;
QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Filters filters,
@@ -139,4 +141,6 @@
return false;
}
+#endif
+
QT_END_NAMESPACE
diff -urb qtbase/src/corelib/io/qloggingcategory.h qtbase/src/corelib/io/qloggingcategory.h
--- qtbase/src/corelib/io/qloggingcategory.h
+++ qtbase/src/corelib/io/qloggingcategory.h
@@ -147,15 +147,15 @@
#if defined(QT_NO_DEBUG_OUTPUT)
# undef qCDebug
-# define qCDebug(category) QT_NO_QDEBUG_MACRO()
+# define qCDebug(category, ...) QT_NO_QDEBUG_MACRO()
#endif
#if defined(QT_NO_INFO_OUTPUT)
# undef qCInfo
-# define qCInfo(category) QT_NO_QDEBUG_MACRO()
+# define qCInfo(category, ...) QT_NO_QDEBUG_MACRO()
#endif
#if defined(QT_NO_WARNING_OUTPUT)
# undef qCWarning
-# define qCWarning(category) QT_NO_QDEBUG_MACRO()
+# define qCWarning(category, ...) QT_NO_QDEBUG_MACRO()
#endif
QT_END_NAMESPACE
diff -urb qtbase/src/corelib/statemachine/qabstractstate_p.h qtbase/src/corelib/statemachine/qabstractstate_p.h
--- qtbase/src/corelib/statemachine/qabstractstate_p.h
+++ qtbase/src/corelib/statemachine/qabstractstate_p.h
@@ -50,6 +50,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_STATEMACHINE
+
class QStateMachine;
class QState;
@@ -86,6 +88,8 @@
mutable QState *parentState;
};
+#endif
+
QT_END_NAMESPACE
#endif
diff -urb qtbase/src/corelib/statemachine/qhistorystate.cpp qtbase/src/corelib/statemachine/qhistorystate.cpp
--- qtbase/src/corelib/statemachine/qhistorystate.cpp
+++ qtbase/src/corelib/statemachine/qhistorystate.cpp
@@ -33,10 +33,10 @@
#include "qhistorystate.h"
-#ifndef QT_NO_STATEMACHINE
-
#include "qhistorystate_p.h"
+#ifndef QT_NO_STATEMACHINE
+
QT_BEGIN_NAMESPACE
/*!
diff -urb qtbase/src/corelib/statemachine/qhistorystate_p.h qtbase/src/corelib/statemachine/qhistorystate_p.h
--- qtbase/src/corelib/statemachine/qhistorystate_p.h
+++ qtbase/src/corelib/statemachine/qhistorystate_p.h
@@ -51,6 +51,8 @@
#include <QtCore/qhistorystate.h>
#include <QtCore/qlist.h>
+#ifndef QT_NO_STATEMACHINE
+
QT_BEGIN_NAMESPACE
class QHistoryStatePrivate : public QAbstractStatePrivate
@@ -85,6 +87,8 @@
virtual void onTransition(QEvent *event) { Q_UNUSED(event); }
};
+#endif
+
QT_END_NAMESPACE
#endif
diff -urb qtbase/src/gui/kernel/qplatforminputcontextfactory.cpp qtbase/src/gui/kernel/qplatforminputcontextfactory.cpp
--- qtbase/src/gui/kernel/qplatforminputcontextfactory.cpp
+++ qtbase/src/gui/kernel/qplatforminputcontextfactory.cpp
@@ -42,14 +42,14 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#if !defined(QT_NO_LIBRARY)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QPlatformInputContextFactoryInterface_iid, QLatin1String("/platforminputcontexts"), Qt::CaseInsensitive))
#endif
QStringList QPlatformInputContextFactory::keys()
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#if !defined(QT_NO_LIBRARY)
return loader()->keyMap().values();
#else
return QStringList();
@@ -64,7 +64,7 @@
QPlatformInputContext *QPlatformInputContextFactory::create(const QString& key)
{
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#if !defined(QT_NO_LIBRARY)
if (!key.isEmpty()) {
QStringList paramList = key.split(QLatin1Char(':'));
const QString platform = paramList.takeFirst().toLower();
diff -urb qtbase/src/gui/painting/qcolor.cpp qtbase/src/gui/painting/qcolor.cpp
--- qtbase/src/gui/painting/qcolor.cpp
+++ qtbase/src/gui/painting/qcolor.cpp
@@ -524,7 +524,7 @@
return QLatin1Char('#') + QString::number(rgba() | 0x1000000, 16).rightRef(6);
case HexArgb:
// it's called rgba() but it does return AARRGGBB
- return QLatin1Char('#') + QString::number(rgba() | 0x100000000, 16).rightRef(8);
+ return QLatin1Char('#') + QString::number(rgba() | 0x100000000LL, 16).rightRef(8);
}
return QString();
}
diff -urb qtbase/src/network/socket/qlocalserver_win.cpp qtbase/src/network/socket/qlocalserver_win.cpp
--- qtbase/src/network/socket/qlocalserver_win.cpp
+++ qtbase/src/network/socket/qlocalserver_win.cpp
@@ -31,6 +31,8 @@
**
****************************************************************************/
+#ifndef QT_NO_LOCALSERVER
+
#include "qlocalserver.h"
#include "qlocalserver_p.h"
#include "qlocalsocket.h"
@@ -334,3 +336,5 @@
}
QT_END_NAMESPACE
+
+#endif
diff -urb qtbase/src/network/socket/qnativesocketengine_win.cpp qtbase/src/network/socket/qnativesocketengine_win.cpp
--- qtbase/src/network/socket/qnativesocketengine_win.cpp
+++ qtbase/src/network/socket/qnativesocketengine_win.cpp
@@ -32,6 +32,8 @@
**
****************************************************************************/
+#ifndef QT_NO_NETWORKINTERFACE
+
// Prevent windows system header files from defining min/max as macros.
#define NOMINMAX 1
@@ -1639,3 +1641,5 @@
}
QT_END_NAMESPACE
+
+#endif
diff -urb qtbase/src/platformsupport/clipboard/qmacmime.mm qtbase/src/platformsupport/clipboard/qmacmime.mm
--- qtbase/src/platformsupport/clipboard/qmacmime.mm
+++ qtbase/src/platformsupport/clipboard/qmacmime.mm
@@ -404,8 +404,10 @@
QVariant ret;
if (flavor == QLatin1String("public.utf8-plain-text")) {
ret = QString::fromUtf8(firstData);
+#ifndef QT_NO_TEXTCODEC
} else if (flavor == QLatin1String("public.utf16-plain-text")) {
ret = QTextCodec::codecForName("UTF-16")->toUnicode(firstData);
+#endif
} else {
qWarning("QMime::convertToMime: unhandled mimetype: %s", qPrintable(mimetype));
}
@@ -418,8 +420,10 @@
QString string = data.toString();
if (flavor == QLatin1String("public.utf8-plain-text"))
ret.append(string.toUtf8());
+#ifndef QT_NO_TEXTCODEC
else if (flavor == QLatin1String("public.utf16-plain-text"))
ret.append(QTextCodec::codecForName("UTF-16")->fromUnicode(string));
+#endif
return ret;
}
diff -urb qtbase/src/plugins/generic/generic.pro qtbase/src/plugins/generic/generic.pro
--- qtbase/src/plugins/generic/generic.pro
+++ qtbase/src/plugins/generic/generic.pro
@@ -10,10 +10,6 @@
SUBDIRS += tslib
}
-!contains(QT_DISABLED_FEATURES, udpsocket) {
- SUBDIRS += tuiotouch
-}
-
contains(QT_CONFIG, libinput) {
SUBDIRS += libinput
}
diff -urb qtbase/src/plugins/platforminputcontexts/compose/compose.pro qtbase/src/plugins/platforminputcontexts/compose/compose.pro
--- qtbase/src/plugins/platforminputcontexts/compose/compose.pro
+++ qtbase/src/plugins/platforminputcontexts/compose/compose.pro
@@ -24,6 +24,5 @@
OTHER_FILES += $$PWD/compose.json
PLUGIN_TYPE = platforminputcontexts
-PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin
load(qt_plugin)
diff -urb qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
--- qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
+++ qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
@@ -187,6 +187,7 @@
// Returns true on success, false otherwise.
static bool saveCache(const QComposeCacheFileHeader &info, const QVector<QComposeTableElement> &vec)
{
+#ifndef QT_NO_TEMPORARYFILE
const QString filePath = getCacheFilePath();
QSaveFile outputFile(filePath);
@@ -202,6 +203,9 @@
if (outputFile.write(data, size) != size)
return false;
return outputFile.commit();
+#else
+ return false;
+#endif
}
TableGenerator::TableGenerator() : m_state(NoErrors),
diff -urb qtbase/src/plugins/platforminputcontexts/ibus/ibus.pro qtbase/src/plugins/platforminputcontexts/ibus/ibus.pro
--- qtbase/src/plugins/platforminputcontexts/ibus/ibus.pro
+++ qtbase/src/plugins/platforminputcontexts/ibus/ibus.pro
@@ -15,6 +15,5 @@
OTHER_FILES += $$PWD/ibus.json
PLUGIN_TYPE = platforminputcontexts
-PLUGIN_EXTENDS = -
PLUGIN_CLASS_NAME = QIbusPlatformInputContextPlugin
load(qt_plugin)
diff -urb qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm
--- qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -90,8 +90,10 @@
QPlatformDialogHelper * QCocoaTheme::createPlatformDialogHelper(DialogType dialogType) const
{
switch (dialogType) {
+#ifndef QT_NO_FILEDIALOG
case QPlatformTheme::FileDialog:
return new QCocoaFileDialogHelper();
+#endif
#ifndef QT_NO_COLORDIALOG
case QPlatformTheme::ColorDialog:
return new QCocoaColorDialogHelper();
diff -urb qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm
--- qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -272,7 +272,7 @@
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = 0;
NSApplication *application = [NSApplication sharedApplication];
#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
@@ -313,7 +313,7 @@
continue;
if ([window conformsToProtocol:@protocol(QNSWindowProtocol)]) {
- QCocoaWindow *cocoaWindow = static_cast<id<QNSWindowProtocol>>(window).helper.platformWindow;
+ QCocoaWindow *cocoaWindow = static_cast<id<QNSWindowProtocol> >(window).helper.platformWindow;
window.level = notification.name == NSApplicationWillResignActiveNotification ?
NSNormalWindowLevel : cocoaWindow->windowLevel(cocoaWindow->window()->flags());
}
diff -urb qtbase/src/plugins/platforms/windows/qwindowsdrag.cpp qtbase/src/plugins/platforms/windows/qwindowsdrag.cpp
--- qtbase/src/plugins/platforms/windows/qwindowsdrag.cpp
+++ qtbase/src/plugins/platforms/windows/qwindowsdrag.cpp
@@ -61,6 +61,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_DRAGANDDROP
+
/*!
\class QWindowsDragCursorWindow
\brief A toplevel window showing the drag icon in case of touch drag.
@@ -764,4 +766,6 @@
}
}
+#endif
+
QT_END_NAMESPACE
diff -urb qtbase/src/plugins/platforms/windows/qwindowsdrag.h qtbase/src/plugins/platforms/windows/qwindowsdrag.h
--- qtbase/src/plugins/platforms/windows/qwindowsdrag.h
+++ qtbase/src/plugins/platforms/windows/qwindowsdrag.h
@@ -39,6 +39,8 @@
#include <qpa/qplatformdrag.h>
#include <QtGui/QPixmap>
+#ifndef QT_NO_DRAGANDDROP
+
struct IDropTargetHelper;
QT_BEGIN_NAMESPACE
@@ -107,4 +109,6 @@
QT_END_NAMESPACE
+#endif
+
#endif // QWINDOWSDRAG_H
diff -urb qtbase/src/plugins/platforms/xcb/xcb-plugin.pro qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
--- qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
+++ qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
@@ -10,3 +10,5 @@
PLUGIN_CLASS_NAME = QXcbIntegrationPlugin
!equals(TARGET, $$QT_DEFAULT_QPA_PLUGIN): PLUGIN_EXTENDS = -
load(qt_plugin)
+
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
diff -urb qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro
--- qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -90,6 +90,7 @@
DEFINES += XCB_USE_RENDER
XCB_DIR = ../../../3rdparty/xcb
INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
+ !isEmpty(QMAKE_INCDIR_X11) INCLUDEPATH += $$QMAKE_INCDIR_X11
LIBS += -lxcb -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix()
} else {
LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxcb-xinerama
diff -urb qtbase/src/plugins/plugins.pro qtbase/src/plugins/plugins.pro
--- qtbase/src/plugins/plugins.pro
+++ qtbase/src/plugins/plugins.pro
@@ -2,7 +2,6 @@
load(qfeatures)
SUBDIRS *= sqldrivers
-qtHaveModule(network):!contains(QT_DISABLED_FEATURES, bearermanagement): SUBDIRS += bearer
qtHaveModule(gui) {
SUBDIRS *= platforms platforminputcontexts platformthemes
!contains(QT_DISABLED_FEATURES, imageformatplugin): SUBDIRS *= imageformats
diff -urb qtbase/src/plugins/printsupport/printsupport.pro qtbase/src/plugins/printsupport/printsupport.pro
--- qtbase/src/plugins/printsupport/printsupport.pro
+++ qtbase/src/plugins/printsupport/printsupport.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
osx: SUBDIRS += cocoa
-win32: SUBDIRS += windows
unix:!mac:contains(QT_CONFIG, cups) {
load(qfeatures)
!contains(QT_DISABLED_FEATURES, cups): SUBDIRS += cups
diff -urb qtbase/src/plugins/printsupport/windows/main.cpp qtbase/src/plugins/printsupport/windows/main.cpp
--- qtbase/src/plugins/printsupport/windows/main.cpp
+++ qtbase/src/plugins/printsupport/windows/main.cpp
@@ -35,6 +35,8 @@
#include <qpa/qplatformprintplugin.h>
#include <QtCore/QStringList>
+#ifndef QT_NO_PRINTER
+
#include "qwindowsprintersupport.h"
QT_BEGIN_NAMESPACE
@@ -57,4 +59,6 @@
QT_END_NAMESPACE
+#endif
+
#include "main.moc"
diff -urb qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.cpp qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.cpp
--- qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.cpp
+++ qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.cpp
@@ -40,6 +40,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_PRINTER
+
QWindowsPrinterSupport::QWindowsPrinterSupport()
: QPlatformPrinterSupport()
{
@@ -75,4 +77,6 @@
return QWindowsPrintDevice::defaultPrintDeviceId();
}
+#endif
+
QT_END_NAMESPACE
diff -urb qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.h qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.h
--- qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.h
+++ qtbase/src/plugins/printsupport/windows/qwindowsprintersupport.h
@@ -38,6 +38,8 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_PRINTER
+
class QWindowsPrinterSupport : public QPlatformPrinterSupport
{
public:
@@ -52,6 +54,8 @@
QString defaultPrintDeviceId() const Q_DECL_OVERRIDE;
};
+#endif
+
QT_END_NAMESPACE
#endif // WINDOWSPRINTERSUPPORT_H
diff -urb qtbase/src/printsupport/dialogs/qprintdialog_win.cpp qtbase/src/printsupport/dialogs/qprintdialog_win.cpp
--- qtbase/src/printsupport/dialogs/qprintdialog_win.cpp
+++ qtbase/src/printsupport/dialogs/qprintdialog_win.cpp
@@ -31,10 +31,10 @@
**
****************************************************************************/
-#ifndef QT_NO_PRINTDIALOG
-
#include "qprintdialog.h"
+#ifndef QT_NO_PRINTDIALOG
+
#include <qwidget.h>
#include <qapplication.h>
#include <qmessagebox.h>
diff -urb qtbase/src/printsupport/kernel/qprintengine_win.cpp qtbase/src/printsupport/kernel/qprintengine_win.cpp
--- qtbase/src/printsupport/kernel/qprintengine_win.cpp
+++ qtbase/src/printsupport/kernel/qprintengine_win.cpp
@@ -31,10 +31,10 @@
**
****************************************************************************/
-#ifndef QT_NO_PRINTER
-
#include "qprintengine_win_p.h"
+#ifndef QT_NO_PRINTER
+
#include <limits.h>
#include <private/qprinter_p.h>
diff -urb qtbase/src/testlib/qtestcase.cpp qtbase/src/testlib/qtestcase.cpp
--- qtbase/src/testlib/qtestcase.cpp
+++ qtbase/src/testlib/qtestcase.cpp
@@ -3173,6 +3173,7 @@
Returns the temporary directory where the data was extracted or null in case of
errors.
*/
+#ifndef QT_NO_TEMPORARYFILE
QSharedPointer<QTemporaryDir> QTest::qExtractTestData(const QString &dirName)
{
QSharedPointer<QTemporaryDir> result; // null until success, then == tempDir
@@ -3223,6 +3224,7 @@
return result;
}
+#endif
/*! \internal
*/
diff -urb qtbase/src/testlib/qtestcase.h qtbase/src/testlib/qtestcase.h
--- qtbase/src/testlib/qtestcase.h
+++ qtbase/src/testlib/qtestcase.h
@@ -278,7 +278,9 @@
Q_TESTLIB_EXPORT void ignoreMessage(QtMsgType type, const QRegularExpression &messagePattern);
#endif
+#ifndef QT_NO_TEMPORARYFILE
Q_TESTLIB_EXPORT QSharedPointer<QTemporaryDir> qExtractTestData(const QString &dirName);
+#endif
Q_TESTLIB_EXPORT QString qFindTestData(const char* basepath, const char* file = Q_NULLPTR, int line = 0, const char* builddir = Q_NULLPTR);
Q_TESTLIB_EXPORT QString qFindTestData(const QString& basepath, const char* file = Q_NULLPTR, int line = 0, const char* builddir = Q_NULLPTR);
diff -urb qtbase/src/tools/uic/cpp/cppextractimages.cpp qtbase/src/tools/uic/cpp/cppextractimages.cpp
--- qtbase/src/tools/uic/cpp/cppextractimages.cpp
+++ qtbase/src/tools/uic/cpp/cppextractimages.cpp
@@ -82,7 +82,9 @@
m_imagesDir = dir;
m_output = new QTextStream(&f);
+#ifndef QT_NO_TEXTCODEC
m_output->setCodec(QTextCodec::codecForName("UTF-8"));
+#endif
QTextStream &out = *m_output;
@@ -126,7 +128,9 @@
if (isXPM_GZ) {
QTextStream *imageOut = new QTextStream(&f);
+#ifndef QT_NO_TEXTCODEC
imageOut->setCodec(QTextCodec::codecForName("UTF-8"));
+#endif
CPP::WriteIconData::writeImage(*imageOut, QString(), m_option.limitXPM_LineLength, image);
delete imageOut;
diff -urb qtbase/src/tools/uic/main.cpp qtbase/src/tools/uic/main.cpp
--- qtbase/src/tools/uic/main.cpp
+++ qtbase/src/tools/uic/main.cpp
@@ -132,7 +132,9 @@
return 1;
}
out = new QTextStream(&f);
+#ifndef QT_NO_TEXTCODEC
out->setCodec(QTextCodec::codecForName("UTF-8"));
+#endif
}
bool rtn = driver.uic(inputFile, out);
diff -urb qtbase/src/widgets/accessible/complexwidgets.cpp qtbase/src/widgets/accessible/complexwidgets.cpp
--- qtbase/src/widgets/accessible/complexwidgets.cpp
+++ qtbase/src/widgets/accessible/complexwidgets.cpp
@@ -121,8 +121,10 @@
return qt_accHotKey(m_parent->tabText(m_index));
case QAccessible::Description:
return m_parent->tabToolTip(m_index);
+#ifndef QT_NO_WHATSTHIS
case QAccessible::Help:
return m_parent->tabWhatsThis(m_index);
+#endif
default:
break;
}
diff -urb qtbase/src/widgets/accessible/itemviews.cpp qtbase/src/widgets/accessible/itemviews.cpp
--- qtbase/src/widgets/accessible/itemviews.cpp
+++ qtbase/src/widgets/accessible/itemviews.cpp
@@ -77,8 +77,10 @@
if (qobject_cast<const QTableView*>(view())) {
m_role = QAccessible::Table;
+#ifndef QT_NO_TREEVIEW
} else if (qobject_cast<const QTreeView*>(view())) {
m_role = QAccessible::Tree;
+#endif
} else if (qobject_cast<const QListView*>(view())) {
m_role = QAccessible::List;
} else {
@@ -632,16 +634,19 @@
// TREE VIEW
+#ifndef QT_NO_TREEVIEW
QModelIndex QAccessibleTree::indexFromLogical(int row, int column) const
{
if (!isValid() || !view()->model())
return QModelIndex();
+#ifndef QT_NO_TREEVIEW
const QTreeView *treeView = qobject_cast<const QTreeView*>(view());
if ((row < 0) || (column < 0) || (treeView->d_func()->viewItems.count() <= row)) {
qWarning() << "QAccessibleTree::indexFromLogical: invalid index: " << row << column << " for " << treeView;
return QModelIndex();
}
+#endif
QModelIndex modelIndex = treeView->d_func()->viewItems.at(row).index;
if (modelIndex.isValid() && column > 0) {
@@ -801,6 +806,7 @@
view()->selectionModel()->select(index, QItemSelectionModel::Select | QItemSelectionModel::Rows);
return true;
}
+#endif
// TABLE CELL
@@ -878,12 +884,14 @@
int QAccessibleTableCell::rowIndex() const
{
+#ifndef QT_NO_TREEVIEW
if (role() == QAccessible::TreeItem) {
const QTreeView *treeView = qobject_cast<const QTreeView*>(view);
Q_ASSERT(treeView);
int row = treeView->d_func()->viewIndex(m_index);
return row;
}
+#endif
return m_index.row();
}
@@ -1012,6 +1020,7 @@
if (view->selectionMode() == QAbstractItemView::ExtendedSelection)
st.extSelectable = true;
}
+#ifndef QT_NO_TREEVIEW
if (m_role == QAccessible::TreeItem) {
const QTreeView *treeView = qobject_cast<const QTreeView*>(view);
if (treeView->model()->hasChildren(m_index))
@@ -1019,6 +1028,7 @@
if (treeView->isExpanded(m_index))
st.expanded = true;
}
+#endif
return st;
}
diff -urb qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
--- qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
+++ qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
@@ -134,8 +134,10 @@
iface = new QAccessibleMenu(widget);
#endif
#ifndef QT_NO_ITEMVIEWS
+#ifndef QT_NO_TREEVIEW
} else if (classname == QLatin1String("QTreeView")) {
iface = new QAccessibleTree(widget);
+#endif
} else if (classname == QLatin1String("QTableView") || classname == QLatin1String("QListView")) {
iface = new QAccessibleTable(widget);
// ### This should be cleaned up. We return the parent for the scrollarea to hide it.
diff -urb qtbase/src/widgets/itemviews/qlistview.cpp qtbase/src/widgets/itemviews/qlistview.cpp
--- qtbase/src/widgets/itemviews/qlistview.cpp
+++ qtbase/src/widgets/itemviews/qlistview.cpp
@@ -1981,7 +1981,9 @@
QListModeViewBase::QListModeViewBase(QListView *q, QListViewPrivate *d)
: QCommonListViewBase(q, d)
{
+#ifndef QT_NO_DRAGANDDROP
dd->defaultDropAction = Qt::CopyAction;
+#endif
}
#ifndef QT_NO_DRAGANDDROP
diff -urb qtbase/src/widgets/itemviews/qtablewidget.h qtbase/src/widgets/itemviews/qtablewidget.h
--- qtbase/src/widgets/itemviews/qtablewidget.h
+++ qtbase/src/widgets/itemviews/qtablewidget.h
@@ -324,7 +324,11 @@
QModelIndex indexFromItem(QTableWidgetItem *item) const;
QTableWidgetItem *itemFromIndex(const QModelIndex &index) const;
- void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *event)
+#ifndef QT_NO_DRAGANDDROP
+Q_DECL_OVERRIDE
+#endif
+;
private:
void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
diff -urb qtbase/src/widgets/styles/qcommonstyle.cpp qtbase/src/widgets/styles/qcommonstyle.cpp
--- qtbase/src/widgets/styles/qcommonstyle.cpp
+++ qtbase/src/widgets/styles/qcommonstyle.cpp
@@ -5195,6 +5195,7 @@
return ret;
}
+#ifndef QT_NO_IMAGEFORMAT_XPM
static QPixmap cachedPixmapFromXPM(const char * const *xpm)
{
QPixmap result;
@@ -5207,6 +5208,7 @@
}
static inline QPixmap titleBarMenuCachedPixmapFromXPM() { return cachedPixmapFromXPM(qt_menu_xpm); }
+#endif
#ifndef QT_NO_IMAGEFORMAT_PNG
static inline QString clearText16IconPath()
diff -urb qtbase/src/widgets/styles/qgtkstyle.cpp qtbase/src/widgets/styles/qgtkstyle.cpp
--- qtbase/src/widgets/styles/qgtkstyle.cpp
+++ qtbase/src/widgets/styles/qgtkstyle.cpp
@@ -497,7 +497,9 @@
if (qobject_cast<QAbstractButton*>(widget)
|| qobject_cast<QToolButton*>(widget)
|| qobject_cast<QComboBox*>(widget)
+#ifndef QT_NO_GROUPBOX
|| qobject_cast<QGroupBox*>(widget)
+#endif
|| qobject_cast<QScrollBar*>(widget)
|| qobject_cast<QSlider*>(widget)
|| qobject_cast<QAbstractSpinBox*>(widget)
@@ -1185,6 +1187,7 @@
}
break;
+#ifndef QT_NO_TOOLBAR
case PE_FrameMenu:
//This is actually done by PE_Widget due to a clipping issue
//Otherwise Menu items will not be able to span the entire menu width
@@ -1198,6 +1201,7 @@
GTK_STATE_NORMAL, GTK_SHADOW_OUT, style);
}
break;
+#endif
case PE_FrameLineEdit: {
GtkWidget *gtkEntry = d->gtkWidget("GtkEntry");
@@ -1723,6 +1727,7 @@
qt_gtk_draw_mdibutton(painter, titleBar, contextHelpButtonRect, hover, sunken);
QColor blend;
+#ifndef QT_NO_IMAGEFORMAT_XPM
QImage image(qt_titlebar_context_help);
QColor alpha = textColor;
alpha.setAlpha(128);
@@ -1730,6 +1735,7 @@
image.setColor(2, alpha.rgba());
painter->setRenderHint(QPainter::SmoothPixmapTransform);
painter->drawImage(contextHelpButtonRect.adjusted(4, 4, -4, -4), image);
+#endif
}
}
@@ -1740,9 +1746,11 @@
bool hover = (titleBar->activeSubControls & SC_TitleBarShadeButton) && (titleBar->state & State_MouseOver);
bool sunken = (titleBar->activeSubControls & SC_TitleBarShadeButton) && (titleBar->state & State_Sunken);
qt_gtk_draw_mdibutton(painter, titleBar, shadeButtonRect, hover, sunken);
+#ifndef QT_NO_IMAGEFORMAT_XPM
QImage image(qt_scrollbar_button_arrow_up);
image.setColor(1, textColor.rgba());
painter->drawImage(shadeButtonRect.adjusted(5, 7, -5, -7), image);
+#endif
}
}
@@ -1753,9 +1761,11 @@
bool hover = (titleBar->activeSubControls & SC_TitleBarUnshadeButton) && (titleBar->state & State_MouseOver);
bool sunken = (titleBar->activeSubControls & SC_TitleBarUnshadeButton) && (titleBar->state & State_Sunken);
qt_gtk_draw_mdibutton(painter, titleBar, unshadeButtonRect, hover, sunken);
+#ifndef QT_NO_IMAGEFORMAT_XPM
QImage image(qt_scrollbar_button_arrow_down);
image.setColor(1, textColor.rgba());
painter->drawImage(unshadeButtonRect.adjusted(5, 7, -5, -7), image);
+#endif
}
}
@@ -2631,10 +2641,12 @@
painter->setPen(oldPen);
}
break;
+#ifndef QT_NO_DIAL
case CC_Dial:
if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(option))
QStyleHelper::drawDial(dial, painter);
break;
+#endif
#endif // QT_NO_SLIDER
@@ -3870,6 +3882,7 @@
return newSize;
switch (type) {
+#ifndef QT_NO_GROUPBOX
case CT_GroupBox:
// Since we use a bold font we have to recalculate base width
if (const QGroupBox *gb = qobject_cast<const QGroupBox*>(widget)) {
@@ -3885,17 +3898,20 @@
}
newSize += QSize(4, 1 + groupBoxBottomMargin + groupBoxTopMargin + groupBoxTitleMargin); // Add some space below the groupbox
break;
+#endif
case CT_ToolButton:
if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton");
GtkStyle *gtkButtonStyle = d->gtk_widget_get_style(gtkButton);
newSize = size + QSize(2 * gtkButtonStyle->xthickness, 2 + 2 * gtkButtonStyle->ythickness);
+#ifndef QT_NO_TOOLBAR
if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) {
QSize minSize(0, 25);
if (toolbutton->toolButtonStyle != Qt::ToolButtonTextOnly)
minSize = toolbutton->iconSize + QSize(12, 12);
newSize = newSize.expandedTo(minSize);
}
+#endif
if (toolbutton->features & QStyleOptionToolButton::HasMenu)
newSize += QSize(6, 0);
@@ -3953,8 +3969,10 @@
GtkStyle *gtkComboStyle = d->gtk_widget_get_style(gtkCombo);
newSize = size + QSize(12 + arrowButtonRect.width() + 2*gtkComboStyle->xthickness, 4 + 2*gtkComboStyle->ythickness);
+#ifndef QT_NO_TOOLBAR
if (!(widget && qobject_cast<QToolBar *>(widget->parentWidget())))
newSize += QSize(0, 2);
+#endif
}
break;
case CT_TabBarTab:
@@ -4054,6 +4072,7 @@
QPixmap pixmap;
switch (sp) {
+#ifndef QT_NO_IMAGEFORMAT_XPM
case SP_TitleBarNormalButton: {
QImage restoreButton(dock_widget_restore_xpm);
QColor alphaCorner = restoreButton.color(2);
@@ -4075,6 +4094,7 @@
return QPixmap::fromImage(closeButton);
}
break;
+#endif
case SP_DialogDiscardButton:
return qt_gtk_get_icon(GTK_STOCK_DELETE);
diff -urb qtbase/src/widgets/styles/qmacstyle_mac.mm qtbase/src/widgets/styles/qmacstyle_mac.mm
--- qtbase/src/widgets/styles/qmacstyle_mac.mm
+++ qtbase/src/widgets/styles/qmacstyle_mac.mm
@@ -442,9 +442,13 @@
static inline bool isTreeView(const QWidget *widget)
{
+#ifndef QT_NO_TREEVIEW
return (widget && widget->parentWidget() &&
(qobject_cast<const QTreeView *>(widget->parentWidget())
));
+#else
+ return false;
+#endif
}
static inline ThemeTabDirection getTabDirection(QTabBar::Shape shape)
@@ -1410,6 +1414,7 @@
// an extra check here before using the mini and small buttons.
int h = combo->rect.size().height();
if (combo->editable){
+#ifndef QT_NO_DATETIMEEDIT
if (qobject_cast<const QDateTimeEdit *>(widget)) {
// Except when, you know, we get a QDateTimeEdit with calendarPopup
// enabled. And then things get weird, basically because it's a
@@ -1427,6 +1432,9 @@
else
bdi->kind = kThemeComboBox;
} else {
+#else
+ {
+#endif
if (h < 21)
bdi->kind = kThemeComboBoxMini;
else if (h < 26)
@@ -3071,9 +3079,11 @@
case SH_FocusFrame_AboveWidget:
ret = true;
break;
+#ifndef QT_NO_WIZARD
case SH_WizardStyle:
ret = QWizard::MacStyle;
break;
+#endif
case SH_ItemView_ArrowKeysNavigateIntoChildren:
ret = false;
break;
@@ -3311,6 +3321,7 @@
case PE_PanelTipLabel:
p->fillRect(opt->rect, opt->palette.brush(QPalette::ToolTipBase));
break;
+#ifndef QT_NO_GROUPBOX
case PE_FrameGroupBox:
if (const QStyleOptionFrame *groupBox = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
if (groupBox->features & QStyleOptionFrame::Flat) {
@@ -3328,6 +3339,7 @@
}
}
break;
+#endif
case PE_IndicatorToolBarSeparator: {
QPainterPath path;
if (opt->state & State_Horizontal) {
@@ -4361,6 +4373,7 @@
}
}
break;
+#ifndef QT_NO_DOCKWIDGET
case CE_DockWidgetTitle:
if (const QDockWidget *dockWidget = qobject_cast<const QDockWidget *>(w)) {
bool floating = dockWidget->isFloating();
@@ -4437,6 +4450,7 @@
}
}
break;
+#endif
case CE_FocusFrame: {
const int hMargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, opt, w);
const int vMargin = proxy()->pixelMetric(QStyle::PM_FocusFrameVMargin, opt, w);
@@ -4847,6 +4861,7 @@
}
}
break;
+#ifndef QT_NO_TOOLBAR
case CE_ToolBar: {
const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(opt);
@@ -4913,6 +4928,7 @@
} break;
+#endif
default:
QCommonStyle::drawControl(ce, opt, p, w);
break;
@@ -5082,6 +5098,7 @@
setLayoutItemMargins(0, +7, 0 /* fix */, -6, &rect, opt->direction);
}
break;
+#ifndef QT_NO_TOOLBAR
case SE_ComboBoxLayoutItem:
if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) {
// Do nothing, because QToolbar needs the entire widget rect.
@@ -5099,6 +5116,7 @@
}
}
break;
+#endif
case SE_LabelLayoutItem:
rect = opt->rect;
setLayoutItemMargins(+1, 0 /* SHOULD be -1, done for alignment */, 0, 0 /* SHOULD be -1, done for alignment */, &rect, opt->direction);
@@ -6100,10 +6118,12 @@
#endif
}
break;
+#ifndef QT_NO_DIAL
case CC_Dial:
if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt))
QStyleHelper::drawDial(dial, p);
break;
+#endif
default:
QCommonStyle::drawComplexControl(cc, opt, p, widget);
break;
diff -urb qtbase/src/widgets/styles/qstylesheetstyle.cpp qtbase/src/widgets/styles/qstylesheetstyle.cpp
--- qtbase/src/widgets/styles/qstylesheetstyle.cpp
+++ qtbase/src/widgets/styles/qstylesheetstyle.cpp
@@ -3851,10 +3851,12 @@
if (pb->minimum == 0 && pb->maximum == 0) {
int chunkCount = fillWidth/chunkWidth;
int offset = 0;
+#ifndef QT_NO_ANIMATION
if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject)))
offset = animation->animationStep() * 8 % rect.width();
else
d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
+#endif
int x = reverse ? r.left() + r.width() - offset - chunkWidth : r.x() + offset;
while (chunkCount > 0) {
r.setRect(x, rect.y(), chunkWidth, rect.height());
@@ -3886,7 +3888,9 @@
x += reverse ? -chunkWidth : chunkWidth;
}
+#ifndef QT_NO_ANIMATION
d->stopAnimation(opt->styleObject);
+#endif
}
p->restore();
diff -urb qtbase/src/widgets/styles/qwindowsstyle.cpp qtbase/src/widgets/styles/qwindowsstyle.cpp
--- qtbase/src/widgets/styles/qwindowsstyle.cpp
+++ qtbase/src/widgets/styles/qwindowsstyle.cpp
@@ -1759,10 +1759,12 @@
int step = 0;
int chunkCount = w / unit_width + 1;
+#ifndef QT_NO_ANIMATION
if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject)))
step = (animation->animationStep() / 3) % chunkCount;
else
d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
+#endif
int chunksInRow = 5;
int myY = pbBits.rect.y();
int myHeight = pbBits.rect.height();
@@ -1796,7 +1798,9 @@
p->restore(); //restore state
}
else {
+#ifndef QT_NO_ANIMATION
d->stopAnimation(opt->styleObject);
+#endif
QCommonStyle::drawControl(ce, opt, p, widget);
}
}
diff -urb qtbase/src/widgets/styles/qwindowsvistastyle.cpp qtbase/src/widgets/styles/qwindowsvistastyle.cpp
--- qtbase/src/widgets/styles/qwindowsvistastyle.cpp
+++ qtbase/src/widgets/styles/qwindowsvistastyle.cpp
@@ -1013,12 +1013,14 @@
const bool vertical = bar->orientation == Qt::Vertical;
const bool inverted = bar->invertedAppearance;
+#ifndef QT_NO_ANIMATION
if (isIndeterminate || (bar->progress > 0 && (bar->progress < bar->maximum) && d->transitionsEnabled())) {
if (!d->animation(styleObject(option)))
d->startAnimation(new QProgressStyleAnimation(d->animationFps, styleObject(option)));
} else {
d->stopAnimation(styleObject(option));
}
+#endif
XPThemeData theme(widget, painter,
QWindowsXPStylePrivate::ProgressTheme,
@@ -1028,6 +1030,7 @@
QTime current = QTime::currentTime();
if (isIndeterminate) {
+#ifndef QT_NO_ANIMATION
if (QProgressStyleAnimation *a = qobject_cast<QProgressStyleAnimation *>(d->animation(styleObject(option)))) {
int glowSize = 120;
int animationWidth = glowSize * 2 + (vertical ? theme.rect.height() : theme.rect.width());
@@ -1075,6 +1078,7 @@
painter->drawPixmap(animRect, pixmap);
painter->restore();
}
+#endif
}
else {
qint64 progress = qMax<qint64>(bar->progress, bar->minimum); // workaround for bug in QProgressBar
@@ -1098,6 +1102,7 @@
}
d->drawBackground(theme);
+#ifndef QT_NO_ANIMATION
if (QProgressStyleAnimation *a = qobject_cast<QProgressStyleAnimation *>(d->animation(styleObject(option)))) {
int glowSize = 140;
int animationWidth = glowSize * 2 + (vertical ? theme.rect.height() : theme.rect.width());
@@ -1124,6 +1129,7 @@
d->drawBackground(theme);
painter->restore();
}
+#endif
}
}
break;
diff -urb qtbase/src/widgets/widgets/qcombobox.cpp qtbase/src/widgets/widgets/qcombobox.cpp
--- qtbase/src/widgets/widgets/qcombobox.cpp
+++ qtbase/src/widgets/widgets/qcombobox.cpp
@@ -1773,7 +1773,9 @@
delete d->lineEdit;
d->lineEdit = edit;
+#ifndef QT_NO_IM
qt_widget_private(d->lineEdit)->inheritsInputMethodHints = 1;
+#endif
if (d->lineEdit->parent() != this)
d->lineEdit->setParent(this);
connect(d->lineEdit, SIGNAL(returnPressed()), this, SLOT(_q_returnPressed()));
diff -urb qtbase/src/widgets/widgets/qmainwindowlayout.cpp qtbase/src/widgets/widgets/qmainwindowlayout.cpp
--- qtbase/src/widgets/widgets/qmainwindowlayout.cpp
+++ qtbase/src/widgets/widgets/qmainwindowlayout.cpp
@@ -2125,7 +2125,9 @@
savedState.clear();
currentGapPos.clear();
pluggingWidget = 0;
+#ifndef QT_NO_DOCKWIDGET
setCurrentHoveredFloat(Q_NULLPTR);
+#endif
//applying the state will make sure that the currentGap is updated correctly
//and all the geometries (especially the one from the central widget) is correct
layoutState.apply(false);
@@ -2362,6 +2364,7 @@
void QMainWindowLayout::updateGapIndicator()
{
#ifndef QT_NO_RUBBERBAND
+#ifndef QT_NO_DOCKWIDGET
if ((!widgetAnimator.animating() && !currentGapPos.isEmpty()) || currentHoveredFloat) {
QWidget *expectedParent = currentHoveredFloat ? currentHoveredFloat.data() : parentWidget();
if (!gapIndicator) {
@@ -2372,6 +2375,18 @@
gapIndicator->setParent(expectedParent);
}
gapIndicator->setGeometry(currentHoveredFloat ? currentHoveredFloat->rect() : currentGapRect);
+#else
+ if ((!widgetAnimator.animating() && !currentGapPos.isEmpty())) {
+ QWidget *expectedParent = parentWidget();
+ if (!gapIndicator) {
+ gapIndicator = new QRubberBand(QRubberBand::Rectangle, expectedParent);
+ // For accessibility to identify this special widget.
+ gapIndicator->setObjectName(QLatin1String("qt_rubberband"));
+ } else if (gapIndicator->parent() != expectedParent) {
+ gapIndicator->setParent(expectedParent);
+ }
+ gapIndicator->setGeometry(currentGapRect);
+#endif
gapIndicator->show();
gapIndicator->raise();
} else if (gapIndicator) {
@@ -2494,12 +2509,14 @@
updateGapIndicator();
}
+#ifndef QT_NO_DOCKWIDGET
QDockWidgetGroupWindow *QMainWindowLayout::createTabbedDockWindow()
{
QDockWidgetGroupWindow* f = new QDockWidgetGroupWindow(parentWidget(), Qt::Tool);
new QDockWidgetGroupLayout(f);
return f;
}
+#endif
void QMainWindowLayout::applyState(QMainWindowLayoutState &newState, bool animate)
{