Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm Change-Id: I66a08c770767a93cd26535689e3e7806486aab06
This commit is contained in:
commit
4d180586cd
@ -127,11 +127,13 @@
|
||||
#define QT_FEATURE_commandlineparser -1
|
||||
#define QT_NO_COMPRESS
|
||||
#define QT_JSON_READONLY
|
||||
#define QT_FEATURE_settings 1
|
||||
#define QT_NO_STANDARDPATHS
|
||||
#define QT_FEATURE_textcodec -1
|
||||
#else
|
||||
#define QT_FEATURE_codecs -1
|
||||
#define QT_FEATURE_commandlineparser 1
|
||||
#define QT_FEATURE_settings -1
|
||||
#define QT_FEATURE_textcodec 1
|
||||
#endif
|
||||
|
||||
|
@ -41,7 +41,9 @@
|
||||
#include "qdir.h"
|
||||
#include "qstringlist.h"
|
||||
#include "qfile.h"
|
||||
#if QT_CONFIG(settings)
|
||||
#include "qsettings.h"
|
||||
#endif
|
||||
#include "qlibraryinfo.h"
|
||||
#include "qscopedpointer.h"
|
||||
|
||||
@ -67,7 +69,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
extern void qDumpCPUFeatures(); // in qsimd.cpp
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
|
||||
struct QLibrarySettings
|
||||
{
|
||||
@ -204,7 +206,7 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
|
||||
return 0; //no luck
|
||||
}
|
||||
|
||||
#endif // QT_NO_SETTINGS
|
||||
#endif // settings
|
||||
|
||||
/*!
|
||||
\class QLibraryInfo
|
||||
@ -464,7 +466,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
||||
#endif // QT_BUILD_QMAKE, started inside location !
|
||||
QString ret;
|
||||
bool fromConf = false;
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
#ifdef QT_BUILD_QMAKE
|
||||
// Logic for choosing the right data source: if EffectivePaths are requested
|
||||
// and qt.conf with that section is present, use it, otherwise fall back to
|
||||
@ -547,7 +549,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
||||
ret = QDir::fromNativeSeparators(ret);
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_SETTINGS
|
||||
#endif // settings
|
||||
|
||||
#ifndef QT_BUILD_QMAKE_BOOTSTRAP
|
||||
if (!fromConf) {
|
||||
@ -646,7 +648,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
||||
|
||||
QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
|
||||
{
|
||||
#if !defined(QT_BUILD_QMAKE) && !defined(QT_NO_SETTINGS)
|
||||
#if !defined(QT_BUILD_QMAKE) && QT_CONFIG(settings)
|
||||
QScopedPointer<const QSettings> settings(QLibraryInfoPrivate::findConfiguration());
|
||||
if (!settings.isNull()) {
|
||||
const QString key = QLatin1String(platformsSection)
|
||||
@ -657,7 +659,7 @@ QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(platformName);
|
||||
#endif // !QT_BUILD_QMAKE && !QT_NO_SETTINGS
|
||||
#endif // !QT_BUILD_QMAKE && settings
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,6 @@ HEADERS += \
|
||||
io/qurlquery.h \
|
||||
io/qurltlds_p.h \
|
||||
io/qtldurl_p.h \
|
||||
io/qsettings.h \
|
||||
io/qsettings_p.h \
|
||||
io/qfsfileengine_p.h \
|
||||
io/qfsfileengine_iterator_p.h \
|
||||
io/qfilesystementry_p.h \
|
||||
@ -73,7 +71,6 @@ SOURCES += \
|
||||
io/qurlidna.cpp \
|
||||
io/qurlquery.cpp \
|
||||
io/qurlrecode.cpp \
|
||||
io/qsettings.cpp \
|
||||
io/qfsfileengine.cpp \
|
||||
io/qfsfileengine_iterator.cpp \
|
||||
io/qfilesystementry.cpp \
|
||||
@ -121,6 +118,24 @@ qtConfig(processenvironment) {
|
||||
SOURCES += io/qprocess_unix.cpp
|
||||
}
|
||||
|
||||
qtConfig(settings) {
|
||||
SOURCES += \
|
||||
io/qsettings.cpp
|
||||
HEADERS += \
|
||||
io/qsettings.h \
|
||||
io/qsettings_p.h
|
||||
|
||||
win32 {
|
||||
!winrt {
|
||||
SOURCES += io/qsettings_win.cpp
|
||||
} else {
|
||||
SOURCES += io/qsettings_winrt.cpp
|
||||
}
|
||||
} else: darwin:!nacl {
|
||||
SOURCES += io/qsettings_mac.cpp
|
||||
}
|
||||
}
|
||||
|
||||
win32 {
|
||||
SOURCES += io/qfsfileengine_win.cpp
|
||||
SOURCES += io/qlockfile_win.cpp
|
||||
@ -136,7 +151,6 @@ win32 {
|
||||
io/qwindowspipewriter_p.h
|
||||
|
||||
SOURCES += \
|
||||
io/qsettings_win.cpp \
|
||||
io/qstandardpaths_win.cpp \
|
||||
io/qstorageinfo_win.cpp \
|
||||
io/qwindowspipereader.cpp \
|
||||
@ -146,7 +160,6 @@ win32 {
|
||||
} else {
|
||||
SOURCES += \
|
||||
io/qstandardpaths_winrt.cpp \
|
||||
io/qsettings_winrt.cpp \
|
||||
io/qstorageinfo_stub.cpp
|
||||
}
|
||||
} else:unix {
|
||||
@ -162,9 +175,6 @@ win32 {
|
||||
../3rdparty/forkfd/forkfd.h
|
||||
INCLUDEPATH += ../3rdparty/forkfd
|
||||
}
|
||||
!nacl:mac: {
|
||||
SOURCES += io/qsettings_mac.cpp
|
||||
}
|
||||
mac {
|
||||
SOURCES += io/qstorageinfo_mac.cpp
|
||||
qtConfig(processenvironment): \
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include "qplatformdefs.h"
|
||||
#include "qsettings.h"
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
|
||||
#include "qsettings_p.h"
|
||||
#include "qcache.h"
|
||||
#include "qfile.h"
|
||||
@ -3584,5 +3582,3 @@ QT_END_NAMESPACE
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
#include "moc_qsettings.cpp"
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_SETTINGS
|
||||
|
@ -45,10 +45,7 @@
|
||||
#include <QtCore/qstring.h>
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
QT_REQUIRE_CONFIG(settings);
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@ -208,6 +205,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_SETTINGS
|
||||
|
||||
#endif // QSETTINGS_H
|
||||
|
@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qsettings.h"
|
||||
#ifndef QT_NO_SETTINGS
|
||||
|
||||
#include "qsettings_p.h"
|
||||
#include "qdatetime.h"
|
||||
@ -664,4 +663,3 @@ bool QConfFileSettingsPrivate::writePlistFile(QIODevice &file, const ParsedSetti
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QT_NO_SETTINGS
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qsettings.h"
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
|
||||
#include "qsettings_p.h"
|
||||
#include "qvector.h"
|
||||
#include "qmap.h"
|
||||
@ -864,4 +862,3 @@ QSettingsPrivate *QSettingsPrivate::create(const QString &fileName, QSettings::F
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QT_NO_SETTINGS
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qsettings.h"
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
|
||||
#include "qsettings_p.h"
|
||||
#include "qvector.h"
|
||||
#include "qmap.h"
|
||||
@ -690,4 +688,3 @@ QSettingsPrivate *QSettingsPrivate::create(const QString &fileName, QSettings::F
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QT_NO_SETTINGS
|
||||
|
@ -53,7 +53,9 @@
|
||||
|
||||
#include "QtCore/qcoreapplication.h"
|
||||
#include "QtCore/qtranslator.h"
|
||||
#if QT_CONFIG(settings)
|
||||
#include "QtCore/qsettings.h"
|
||||
#endif
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#include "private/qobject_p.h"
|
||||
#endif
|
||||
|
@ -50,7 +50,9 @@
|
||||
#include <QtCore/qmath.h>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QDir>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/QSettings>
|
||||
#endif
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#include <private/qhexstring_p.h>
|
||||
@ -348,7 +350,7 @@ QIconTheme::QIconTheme(const QString &themeName)
|
||||
m_valid = true;
|
||||
}
|
||||
}
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
if (themeIndex.exists()) {
|
||||
const QSettings indexReader(themeIndex.fileName(), QSettings::IniFormat);
|
||||
const QStringList keys = indexReader.allKeys();
|
||||
@ -407,7 +409,7 @@ QIconTheme::QIconTheme(const QString &themeName)
|
||||
if (!m_parents.contains(QLatin1String("hicolor")))
|
||||
m_parents.append(QLatin1String("hicolor"));
|
||||
}
|
||||
#endif //QT_NO_SETTINGS
|
||||
#endif // settings
|
||||
}
|
||||
|
||||
QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName,
|
||||
|
@ -42,7 +42,9 @@
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QSharedData>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/QSettings>
|
||||
#endif
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QColor>
|
||||
@ -284,7 +286,7 @@ QColorDialogStaticData::QColorDialogStaticData() : customSet(false)
|
||||
|
||||
void QColorDialogStaticData::readSettings()
|
||||
{
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
const QSettings settings(QSettings::UserScope, QStringLiteral("QtProject"));
|
||||
for (int i = 0; i < int(CustomColorCount); ++i) {
|
||||
const QVariant v = settings.value(QLatin1String("Qt/customColors/") + QString::number(i));
|
||||
@ -296,7 +298,7 @@ void QColorDialogStaticData::readSettings()
|
||||
|
||||
void QColorDialogStaticData::writeSettings() const
|
||||
{
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
if (customSet) {
|
||||
const_cast<QColorDialogStaticData*>(this)->customSet = false;
|
||||
QSettings settings(QSettings::UserScope, QStringLiteral("QtProject"));
|
||||
|
@ -48,14 +48,14 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||
(QPlatformInputContextFactoryInterface_iid, QLatin1String("/platforminputcontexts"), Qt::CaseInsensitive))
|
||||
#endif
|
||||
|
||||
QStringList QPlatformInputContextFactory::keys()
|
||||
{
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
return loader()->keyMap().values();
|
||||
#else
|
||||
return QStringList();
|
||||
@ -70,7 +70,7 @@ QString QPlatformInputContextFactory::requested()
|
||||
|
||||
QPlatformInputContext *QPlatformInputContextFactory::create(const QString& key)
|
||||
{
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
if (!key.isEmpty()) {
|
||||
QStringList paramList = key.split(QLatin1Char(':'));
|
||||
const QString platform = paramList.takeFirst().toLower();
|
||||
|
@ -424,7 +424,7 @@
|
||||
Note that by combining this option with ReuseAddressHint, you will
|
||||
also allow your service to rebind an existing shared address. On
|
||||
Unix, this is equivalent to the SO_REUSEADDR socket option. On Windows,
|
||||
this option is ignored.
|
||||
this is the default behavior, so this option is ignored.
|
||||
|
||||
\value DontShareAddress Bind the address and port exclusively, so that
|
||||
no other services are allowed to rebind. By passing this option to
|
||||
@ -444,7 +444,7 @@
|
||||
|
||||
\value DefaultForPlatform The default option for the current platform.
|
||||
On Unix and \macos, this is equivalent to (DontShareAddress
|
||||
+ ReuseAddressHint), and on Windows, its equivalent to ShareAddress.
|
||||
+ ReuseAddressHint), and on Windows, it is equivalent to ShareAddress.
|
||||
*/
|
||||
|
||||
/*! \enum QAbstractSocket::PauseMode
|
||||
@ -455,7 +455,7 @@
|
||||
The only notification currently supported is QSslSocket::sslErrors().
|
||||
|
||||
\value PauseNever Do not pause data transfer on the socket. This is the
|
||||
default and matches the behaviour of Qt 4.
|
||||
default and matches the behavior of Qt 4.
|
||||
\value PauseOnSslErrors Pause data transfer on the socket upon receiving an
|
||||
SSL error notification. I.E. QSslSocket::sslErrors().
|
||||
*/
|
||||
@ -1538,11 +1538,9 @@ void QAbstractSocket::setPauseMode(PauseModes pauseMode)
|
||||
|
||||
Binds to \a address on port \a port, using the BindMode \a mode.
|
||||
|
||||
Binds this socket to the address \a address and the port \a port.
|
||||
|
||||
For UDP sockets, after binding, the signal QUdpSocket::readyRead() is emitted
|
||||
whenever a UDP datagram arrives on the specified address and port.
|
||||
Thus, This function is useful to write UDP servers.
|
||||
Thus, this function is useful to write UDP servers.
|
||||
|
||||
For TCP sockets, this function may be used to specify which interface to use
|
||||
for an outgoing connection, which is useful in case of multiple network
|
||||
|
@ -5205,25 +5205,6 @@ void QGLWidgetPrivate::cleanupColormaps()
|
||||
{
|
||||
}
|
||||
|
||||
Q_GLOBAL_STATIC(QString, qt_gl_lib_name)
|
||||
|
||||
void qt_set_gl_library_name(const QString& name)
|
||||
{
|
||||
qt_gl_lib_name()->operator=(name);
|
||||
}
|
||||
|
||||
const QString qt_gl_library_name()
|
||||
{
|
||||
if (qt_gl_lib_name()->isNull()) {
|
||||
# if defined(QT_OPENGL_ES_2)
|
||||
return QLatin1String("GLESv2");
|
||||
# else
|
||||
return QLatin1String("GL");
|
||||
# endif
|
||||
}
|
||||
return *qt_gl_lib_name();
|
||||
}
|
||||
|
||||
void QGLContextGroup::addShare(const QGLContext *context, const QGLContext *share) {
|
||||
Q_ASSERT(context && share);
|
||||
if (context->d_ptr->group == share->d_ptr->group)
|
||||
|
@ -50,7 +50,9 @@
|
||||
|
||||
#include "qcoretextfontdatabase_p.h"
|
||||
#include "qfontengine_coretext_p.h"
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/QSettings>
|
||||
#endif
|
||||
#include <QtCore/QtEndian>
|
||||
#ifndef QT_NO_FREETYPE
|
||||
#include <QtFontDatabaseSupport/private/qfontengine_ft_p.h>
|
||||
@ -116,21 +118,25 @@ QCoreTextFontDatabase::QCoreTextFontDatabase()
|
||||
: m_hasPopulatedAliases(false)
|
||||
{
|
||||
#ifdef Q_OS_MACX
|
||||
QSettings appleSettings(QLatin1String("apple.com"));
|
||||
QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold"));
|
||||
if (appleValue.isValid())
|
||||
QCoreTextFontEngine::antialiasingThreshold = appleValue.toInt();
|
||||
|
||||
/*
|
||||
font_smoothing = 0 means no smoothing, while 1-3 means subpixel
|
||||
antialiasing with different hinting styles (but we don't care about the
|
||||
exact value, only if subpixel rendering is available or not)
|
||||
*/
|
||||
int font_smoothing = 0;
|
||||
|
||||
#if QT_CONFIG(settings)
|
||||
QSettings appleSettings(QLatin1String("apple.com"));
|
||||
QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold"));
|
||||
if (appleValue.isValid())
|
||||
QCoreTextFontEngine::antialiasingThreshold = appleValue.toInt();
|
||||
|
||||
appleValue = appleSettings.value(QLatin1String("AppleFontSmoothing"));
|
||||
if (appleValue.isValid()) {
|
||||
font_smoothing = appleValue.toInt();
|
||||
} else {
|
||||
} else
|
||||
#endif // settings
|
||||
{
|
||||
// non-Apple displays do not provide enough information about subpixel rendering so
|
||||
// draw text with cocoa and compare pixel colors to see if subpixel rendering is enabled
|
||||
int w = 10;
|
||||
|
@ -41,7 +41,9 @@
|
||||
|
||||
#include <qpa/qplatformfontdatabase.h>
|
||||
#include <QtCore/qendian.h>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/qsettings.h>
|
||||
#endif
|
||||
#include <QtCore/qoperatingsystemversion.h>
|
||||
|
||||
#include <private/qimage_p.h>
|
||||
|
@ -45,7 +45,9 @@
|
||||
#if QT_CONFIG(process)
|
||||
# include <QtCore/QProcess>
|
||||
#endif
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/QSettings>
|
||||
#endif
|
||||
#include <QtCore/QStandardPaths>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
@ -93,7 +95,7 @@ static inline QByteArray detectDesktopEnvironment()
|
||||
// This can be a path in /usr/share/xsessions
|
||||
int slash = desktopSession.lastIndexOf('/');
|
||||
if (slash != -1) {
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
QSettings desktopFile(QFile::decodeName(desktopSession + ".desktop"), QSettings::IniFormat);
|
||||
desktopFile.beginGroup(QStringLiteral("Desktop Entry"));
|
||||
QByteArray desktopName = desktopFile.value(QStringLiteral("DesktopNames")).toByteArray();
|
||||
|
@ -53,7 +53,9 @@
|
||||
#include <QtCore/QMimeDatabase>
|
||||
#endif
|
||||
#include <QtCore/QLoggingCategory>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/QSettings>
|
||||
#endif
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QStandardPaths>
|
||||
#include <QtCore/QStringList>
|
||||
@ -261,7 +263,7 @@ static QIcon xdgFileIcon(const QFileInfo &fileInfo)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
class QKdeThemePrivate : public QPlatformThemePrivate
|
||||
{
|
||||
public:
|
||||
@ -688,7 +690,7 @@ QPlatformSystemTrayIcon *QKdeTheme::createPlatformSystemTrayIcon() const
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_SETTINGS
|
||||
#endif // settings
|
||||
|
||||
/*!
|
||||
\class QGnomeTheme
|
||||
@ -834,7 +836,7 @@ QPlatformTheme *QGenericUnixTheme::createUnixTheme(const QString &name)
|
||||
{
|
||||
if (name == QLatin1String(QGenericUnixTheme::name))
|
||||
return new QGenericUnixTheme;
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
if (name == QLatin1String(QKdeTheme::name))
|
||||
if (QPlatformTheme *kdeTheme = QKdeTheme::createKdeTheme())
|
||||
return kdeTheme;
|
||||
@ -859,7 +861,7 @@ QStringList QGenericUnixTheme::themeNames()
|
||||
const QList<QByteArray> desktopNames = desktopEnvironment.split(':');
|
||||
for (const QByteArray &desktopName : desktopNames) {
|
||||
if (desktopEnvironment == "KDE") {
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
result.push_back(QLatin1String(QKdeTheme::name));
|
||||
#endif
|
||||
} else if (gtkBasedEnvironments.contains(desktopName)) {
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
static const char *name;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
class QKdeThemePrivate;
|
||||
|
||||
class QKdeTheme : public QPlatformTheme
|
||||
@ -123,7 +123,7 @@ public:
|
||||
|
||||
static const char *name;
|
||||
};
|
||||
#endif // QT_NO_SETTINGS
|
||||
#endif // settings
|
||||
|
||||
class QGnomeThemePrivate;
|
||||
|
||||
|
@ -649,8 +649,6 @@ QFunctionPointer QGLXContext::getProcAddress(const char *procName)
|
||||
#endif
|
||||
{
|
||||
#if QT_CONFIG(library)
|
||||
extern const QString qt_gl_library_name();
|
||||
// QLibrary lib(qt_gl_library_name());
|
||||
QLibrary lib(QLatin1String("GL"));
|
||||
if (!lib.load())
|
||||
lib.setFileNameAndVersion(QLatin1String("GL"), 1);
|
||||
|
@ -150,7 +150,7 @@ do {\
|
||||
// Ideally we'd use qWaitFor instead of QTRY_LOOP_IMPL, but due
|
||||
// to a compiler bug on MSVC < 2017 we can't (see QTBUG-59096)
|
||||
#define QTRY_IMPL(expr, timeout)\
|
||||
const int qt_test_step = 50; \
|
||||
const int qt_test_step = timeout < 350 ? timeout / 7 + 1 : 50; \
|
||||
const int qt_test_timeoutValue = timeout; \
|
||||
QTRY_LOOP_IMPL((expr), qt_test_timeoutValue, qt_test_step); \
|
||||
QTRY_TIMEOUT_DEBUG_IMPL((expr), qt_test_timeoutValue, qt_test_step)\
|
||||
|
@ -57,7 +57,9 @@
|
||||
#include "qpainter.h"
|
||||
#include "qpixmap.h"
|
||||
#include "qpushbutton.h"
|
||||
#if QT_CONFIG(settings)
|
||||
#include "qsettings.h"
|
||||
#endif
|
||||
#include "qsharedpointer.h"
|
||||
#include "qstyle.h"
|
||||
#include "qstyleoption.h"
|
||||
|
@ -57,7 +57,9 @@
|
||||
#include <qmessagebox.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <qsettings.h>
|
||||
#endif
|
||||
#include <qdebug.h>
|
||||
#if QT_CONFIG(mimetype)
|
||||
#include <qmimedatabase.h>
|
||||
@ -386,7 +388,7 @@ QFileDialog::QFileDialog(const QFileDialogArgs &args)
|
||||
*/
|
||||
QFileDialog::~QFileDialog()
|
||||
{
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
Q_D(QFileDialog);
|
||||
d->saveSettings();
|
||||
#endif
|
||||
@ -2739,7 +2741,7 @@ void QFileDialog::accept()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
void QFileDialogPrivate::saveSettings()
|
||||
{
|
||||
Q_Q(QFileDialog);
|
||||
@ -2797,7 +2799,7 @@ bool QFileDialogPrivate::restoreFromSettings()
|
||||
|
||||
return restoreWidgetState(history, settings.value(QLatin1String("sidebarWidth"), -1).toInt());
|
||||
}
|
||||
#endif // QT_NO_SETTINGS
|
||||
#endif // settings
|
||||
|
||||
bool QFileDialogPrivate::restoreWidgetState(QStringList &history, int splitterPosition)
|
||||
{
|
||||
@ -2870,7 +2872,7 @@ void QFileDialogPrivate::init(const QUrl &directory, const QString &nameFilter,
|
||||
else
|
||||
q->selectUrl(directory);
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
// Try to restore from the FileDialog settings group; if it fails, fall back
|
||||
// to the pre-5.5 QByteArray serialized settings.
|
||||
if (!restoreFromSettings()) {
|
||||
@ -3035,7 +3037,7 @@ void QFileDialogPrivate::createWidgets()
|
||||
createToolButtons();
|
||||
createMenuActions();
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
// Try to restore from the FileDialog settings group; if it fails, fall back
|
||||
// to the pre-5.5 QByteArray serialized settings.
|
||||
if (!restoreFromSettings()) {
|
||||
|
@ -187,7 +187,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
void saveSettings();
|
||||
bool restoreFromSettings();
|
||||
#endif
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
bool tryCloseAllWindows() override;
|
||||
|
||||
#if 0 // Used to be included in Qt4 for Q_WS_X11
|
||||
#ifndef QT_NO_SETTINGS
|
||||
#if QT_CONFIG(settings)
|
||||
static bool x11_apply_settings();
|
||||
#endif
|
||||
static void reset_instance_pointer();
|
||||
|
@ -102,7 +102,9 @@
|
||||
#endif
|
||||
#include <qfileinfo.h>
|
||||
#include <qdir.h>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <qsettings.h>
|
||||
#endif
|
||||
#include <qvariant.h>
|
||||
#include <qpixmapcache.h>
|
||||
#if QT_CONFIG(animation)
|
||||
|
@ -65,6 +65,9 @@ win32:!qtConfig(private_tests): SUBDIRS -= \
|
||||
qprocess \
|
||||
qprocess-noapplication
|
||||
|
||||
!qtConfig(settings): SUBDIRS -= \
|
||||
qsettings
|
||||
|
||||
winrt: SUBDIRS -= \
|
||||
qstorageinfo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user