Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
f31dbeb4c7
commit
d6330a19b2
@ -43,7 +43,6 @@ QT_REQUIRE_CONFIG(iconv);
|
|||||||
|
|
||||||
#include "qiconvcodec_p.h"
|
#include "qiconvcodec_p.h"
|
||||||
#include "qtextcodec_p.h"
|
#include "qtextcodec_p.h"
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#include <qthreadstorage.h>
|
#include <qthreadstorage.h>
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
#define QT_FEATURE_iconv -1
|
#define QT_FEATURE_iconv -1
|
||||||
#define QT_FEATURE_icu -1
|
#define QT_FEATURE_icu -1
|
||||||
#define QT_FEATURE_journald -1
|
#define QT_FEATURE_journald -1
|
||||||
#define QT_NO_LIBRARY
|
|
||||||
#define QT_FEATURE_library -1
|
#define QT_FEATURE_library -1
|
||||||
#define QT_NO_QOBJECT
|
#define QT_NO_QOBJECT
|
||||||
#define QT_FEATURE_process -1
|
#define QT_FEATURE_process -1
|
||||||
|
@ -158,14 +158,15 @@ Q_CORE_EXPORT int qt_ntfs_permission_lookup = 0;
|
|||||||
|
|
||||||
#if defined(Q_OS_WINRT)
|
#if defined(Q_OS_WINRT)
|
||||||
static QString qfsPrivateCurrentDir = QLatin1String("");
|
static QString qfsPrivateCurrentDir = QLatin1String("");
|
||||||
// As none of the functions we try to resolve do exist on WinRT
|
// As none of the functions we try to resolve do exist on WinRT we
|
||||||
// we use QT_NO_LIBRARY to shorten everything up a little bit.
|
// avoid library loading on WinRT in general to shorten everything
|
||||||
# ifndef QT_NO_LIBRARY
|
// up a little bit.
|
||||||
# define QT_NO_LIBRARY 1
|
# define QT_FEATURE_fslibs -1
|
||||||
# endif
|
#else
|
||||||
|
# define QT_FEATURE_fslibs QT_FEATURE_library
|
||||||
#endif // Q_OS_WINRT
|
#endif // Q_OS_WINRT
|
||||||
|
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(fslibs)
|
||||||
QT_BEGIN_INCLUDE_NAMESPACE
|
QT_BEGIN_INCLUDE_NAMESPACE
|
||||||
typedef DWORD (WINAPI *PtrGetNamedSecurityInfoW)(LPWSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*);
|
typedef DWORD (WINAPI *PtrGetNamedSecurityInfoW)(LPWSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*);
|
||||||
static PtrGetNamedSecurityInfoW ptrGetNamedSecurityInfoW = 0;
|
static PtrGetNamedSecurityInfoW ptrGetNamedSecurityInfoW = 0;
|
||||||
@ -273,7 +274,7 @@ static void resolveLibs()
|
|||||||
ptrGetUserProfileDirectoryW = (PtrGetUserProfileDirectoryW)GetProcAddress(userenvHnd, "GetUserProfileDirectoryW");
|
ptrGetUserProfileDirectoryW = (PtrGetUserProfileDirectoryW)GetProcAddress(userenvHnd, "GetUserProfileDirectoryW");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(fslibs)
|
||||||
|
|
||||||
typedef DWORD (WINAPI *PtrNetShareEnum)(LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
|
typedef DWORD (WINAPI *PtrNetShareEnum)(LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
|
||||||
static PtrNetShareEnum ptrNetShareEnum = 0;
|
static PtrNetShareEnum ptrNetShareEnum = 0;
|
||||||
@ -343,7 +344,7 @@ static QString readSymLink(const QFileSystemEntry &link)
|
|||||||
free(rdb);
|
free(rdb);
|
||||||
CloseHandle(handle);
|
CloseHandle(handle);
|
||||||
|
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(fslibs)
|
||||||
resolveLibs();
|
resolveLibs();
|
||||||
QRegExp matchVolName(QLatin1String("^Volume\\{([a-z]|[0-9]|-)+\\}\\\\"), Qt::CaseInsensitive);
|
QRegExp matchVolName(QLatin1String("^Volume\\{([a-z]|[0-9]|-)+\\}\\\\"), Qt::CaseInsensitive);
|
||||||
if (matchVolName.indexIn(result) == 0) {
|
if (matchVolName.indexIn(result) == 0) {
|
||||||
@ -353,7 +354,7 @@ static QString readSymLink(const QFileSystemEntry &link)
|
|||||||
if (GetVolumePathNamesForVolumeName(reinterpret_cast<LPCWSTR>(volumeName.utf16()), buffer, MAX_PATH, &len) != 0)
|
if (GetVolumePathNamesForVolumeName(reinterpret_cast<LPCWSTR>(volumeName.utf16()), buffer, MAX_PATH, &len) != 0)
|
||||||
result.replace(0,matchVolName.matchedLength(), QString::fromWCharArray(buffer));
|
result.replace(0,matchVolName.matchedLength(), QString::fromWCharArray(buffer));
|
||||||
}
|
}
|
||||||
#endif // !Q_OS_WINRT
|
#endif // QT_CONFIG(fslibs)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(link);
|
Q_UNUSED(link);
|
||||||
@ -363,7 +364,7 @@ static QString readSymLink(const QFileSystemEntry &link)
|
|||||||
|
|
||||||
static QString readLink(const QFileSystemEntry &link)
|
static QString readLink(const QFileSystemEntry &link)
|
||||||
{
|
{
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(fslibs)
|
||||||
QString ret;
|
QString ret;
|
||||||
|
|
||||||
bool neededCoInit = false;
|
bool neededCoInit = false;
|
||||||
@ -402,7 +403,7 @@ static QString readLink(const QFileSystemEntry &link)
|
|||||||
#else
|
#else
|
||||||
Q_UNUSED(link);
|
Q_UNUSED(link);
|
||||||
return QString();
|
return QString();
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(fslibs)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool uncShareExists(const QString &server)
|
static bool uncShareExists(const QString &server)
|
||||||
@ -648,7 +649,7 @@ QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
|
|||||||
QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own)
|
QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own)
|
||||||
{
|
{
|
||||||
QString name;
|
QString name;
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(fslibs)
|
||||||
extern int qt_ntfs_permission_lookup;
|
extern int qt_ntfs_permission_lookup;
|
||||||
if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
|
if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
|
||||||
resolveLibs();
|
resolveLibs();
|
||||||
@ -698,7 +699,7 @@ QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEng
|
|||||||
bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data,
|
bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data,
|
||||||
QFileSystemMetaData::MetaDataFlags what)
|
QFileSystemMetaData::MetaDataFlags what)
|
||||||
{
|
{
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(fslibs)
|
||||||
if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
|
if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
|
||||||
resolveLibs();
|
resolveLibs();
|
||||||
if(ptrGetNamedSecurityInfoW && ptrBuildTrusteeWithSidW && ptrGetEffectiveRightsFromAclW) {
|
if(ptrGetNamedSecurityInfoW && ptrBuildTrusteeWithSidW && ptrGetEffectiveRightsFromAclW) {
|
||||||
@ -1162,7 +1163,7 @@ QString QFileSystemEngine::rootPath()
|
|||||||
QString QFileSystemEngine::homePath()
|
QString QFileSystemEngine::homePath()
|
||||||
{
|
{
|
||||||
QString ret;
|
QString ret;
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(fslibs)
|
||||||
resolveLibs();
|
resolveLibs();
|
||||||
if (ptrGetUserProfileDirectoryW) {
|
if (ptrGetUserProfileDirectoryW) {
|
||||||
HANDLE hnd = ::GetCurrentProcess();
|
HANDLE hnd = ::GetCurrentProcess();
|
||||||
|
@ -589,7 +589,7 @@ bool QFSFileEnginePrivate::doStat(QFileSystemMetaData::MetaDataFlags flags) cons
|
|||||||
bool QFSFileEngine::link(const QString &newName)
|
bool QFSFileEngine::link(const QString &newName)
|
||||||
{
|
{
|
||||||
#if !defined(Q_OS_WINRT)
|
#if !defined(Q_OS_WINRT)
|
||||||
# if !defined(QT_NO_LIBRARY)
|
# if QT_CONFIG(library)
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
QString linkName = newName;
|
QString linkName = newName;
|
||||||
@ -630,10 +630,10 @@ bool QFSFileEngine::link(const QString &newName)
|
|||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
# else // QT_NO_LIBRARY
|
# else // QT_CONFIG(library)
|
||||||
Q_UNUSED(newName);
|
Q_UNUSED(newName);
|
||||||
return false;
|
return false;
|
||||||
# endif // QT_NO_LIBRARY
|
# endif // QT_CONFIG(library)
|
||||||
#else // !Q_OS_WINRT
|
#else // !Q_OS_WINRT
|
||||||
Q_UNUSED(newName);
|
Q_UNUSED(newName);
|
||||||
Q_UNIMPLEMENTED();
|
Q_UNIMPLEMENTED();
|
||||||
|
@ -339,7 +339,7 @@ struct QCoreApplicationData {
|
|||||||
QString applicationVersion;
|
QString applicationVersion;
|
||||||
bool applicationNameSet; // true if setApplicationName was called
|
bool applicationNameSet; // true if setApplicationName was called
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
QScopedPointer<QStringList> app_libpaths;
|
QScopedPointer<QStringList> app_libpaths;
|
||||||
QScopedPointer<QStringList> manual_libpaths;
|
QScopedPointer<QStringList> manual_libpaths;
|
||||||
#endif
|
#endif
|
||||||
@ -534,7 +534,7 @@ void QCoreApplicationPrivate::checkReceiverThread(QObject *receiver)
|
|||||||
|
|
||||||
void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
|
void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
QStringList *app_libpaths = coreappdata()->app_libpaths.data();
|
QStringList *app_libpaths = coreappdata()->app_libpaths.data();
|
||||||
if (!app_libpaths)
|
if (!app_libpaths)
|
||||||
coreappdata()->app_libpaths.reset(app_libpaths = new QStringList);
|
coreappdata()->app_libpaths.reset(app_libpaths = new QStringList);
|
||||||
@ -735,7 +735,7 @@ void QCoreApplicationPrivate::init()
|
|||||||
|
|
||||||
QLoggingRegistry::instance()->init();
|
QLoggingRegistry::instance()->init();
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
// Reset the lib paths, so that they will be recomputed, taking the availability of argv[0]
|
// Reset the lib paths, so that they will be recomputed, taking the availability of argv[0]
|
||||||
// into account. If necessary, recompute right away and replay the manual changes on top of the
|
// into account. If necessary, recompute right away and replay the manual changes on top of the
|
||||||
// new lib paths.
|
// new lib paths.
|
||||||
@ -834,7 +834,7 @@ QCoreApplication::~QCoreApplication()
|
|||||||
QCoreApplicationPrivate::eventDispatcher = 0;
|
QCoreApplicationPrivate::eventDispatcher = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
coreappdata()->app_libpaths.reset();
|
coreappdata()->app_libpaths.reset();
|
||||||
coreappdata()->manual_libpaths.reset();
|
coreappdata()->manual_libpaths.reset();
|
||||||
#endif
|
#endif
|
||||||
@ -2414,7 +2414,7 @@ QString QCoreApplication::applicationVersion()
|
|||||||
return coreappdata()->applicationVersion;
|
return coreappdata()->applicationVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
|
Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
|
||||||
|
|
||||||
@ -2626,7 +2626,7 @@ void QCoreApplication::removeLibraryPath(const QString &path)
|
|||||||
QFactoryLoader::refreshAll();
|
QFactoryLoader::refreshAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
#ifndef QT_NO_QOBJECT
|
#ifndef QT_NO_QOBJECT
|
||||||
|
|
||||||
|
@ -141,12 +141,12 @@ public:
|
|||||||
static QString applicationFilePath();
|
static QString applicationFilePath();
|
||||||
static qint64 applicationPid();
|
static qint64 applicationPid();
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
static void setLibraryPaths(const QStringList &);
|
static void setLibraryPaths(const QStringList &);
|
||||||
static QStringList libraryPaths();
|
static QStringList libraryPaths();
|
||||||
static void addLibraryPath(const QString &);
|
static void addLibraryPath(const QString &);
|
||||||
static void removeLibraryPath(const QString &);
|
static void removeLibraryPath(const QString &);
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
#ifndef QT_NO_TRANSLATION
|
#ifndef QT_NO_TRANSLATION
|
||||||
static bool installTranslator(QTranslator * messageFile);
|
static bool installTranslator(QTranslator * messageFile);
|
||||||
|
@ -3,36 +3,35 @@
|
|||||||
HEADERS += \
|
HEADERS += \
|
||||||
plugin/qfactoryinterface.h \
|
plugin/qfactoryinterface.h \
|
||||||
plugin/qpluginloader.h \
|
plugin/qpluginloader.h \
|
||||||
plugin/qlibrary.h \
|
|
||||||
plugin/qlibrary_p.h \
|
|
||||||
plugin/qplugin.h \
|
plugin/qplugin.h \
|
||||||
plugin/quuid.h \
|
plugin/quuid.h \
|
||||||
plugin/qfactoryloader_p.h \
|
plugin/qfactoryloader_p.h
|
||||||
plugin/qsystemlibrary_p.h \
|
|
||||||
plugin/qelfparser_p.h \
|
|
||||||
plugin/qmachparser_p.h
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
plugin/qfactoryinterface.cpp \
|
plugin/qfactoryinterface.cpp \
|
||||||
plugin/qpluginloader.cpp \
|
plugin/qpluginloader.cpp \
|
||||||
plugin/qfactoryloader.cpp \
|
plugin/qfactoryloader.cpp \
|
||||||
plugin/quuid.cpp \
|
plugin/quuid.cpp
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
HEADERS += plugin/qsystemlibrary_p.h
|
||||||
|
SOURCES += plugin/qsystemlibrary.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
qtConfig(library) {
|
||||||
|
HEADERS += \
|
||||||
|
plugin/qlibrary.h \
|
||||||
|
plugin/qlibrary_p.h \
|
||||||
|
plugin/qelfparser_p.h \
|
||||||
|
plugin/qmachparser_p.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
plugin/qlibrary.cpp \
|
plugin/qlibrary.cpp \
|
||||||
plugin/qelfparser_p.cpp \
|
plugin/qelfparser_p.cpp \
|
||||||
plugin/qmachparser.cpp
|
plugin/qmachparser.cpp
|
||||||
|
|
||||||
win32 {
|
unix: SOURCES += plugin/qlibrary_unix.cpp
|
||||||
SOURCES += \
|
else: SOURCES += plugin/qlibrary_win.cpp
|
||||||
plugin/qlibrary_win.cpp \
|
|
||||||
plugin/qsystemlibrary.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
unix {
|
|
||||||
SOURCES += plugin/qlibrary_unix.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
integrity {
|
|
||||||
SOURCES += plugin/qlibrary_unix.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
qtConfig(dlopen): QMAKE_USE_PRIVATE += libdl
|
qtConfig(dlopen): QMAKE_USE_PRIVATE += libdl
|
||||||
|
}
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
#include "qelfparser_p.h"
|
#include "qelfparser_p.h"
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
|
|
||||||
#include "qlibrary_p.h"
|
#include "qlibrary_p.h"
|
||||||
@ -235,4 +234,3 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
@ -54,7 +54,8 @@
|
|||||||
#include <qendian.h>
|
#include <qendian.h>
|
||||||
#include <private/qglobal_p.h>
|
#include <private/qglobal_p.h>
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
QT_REQUIRE_CONFIG(library);
|
||||||
|
|
||||||
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -101,6 +102,5 @@ public:
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
|
||||||
#endif // QELFPARSER_P_H
|
#endif // QELFPARSER_P_H
|
||||||
|
@ -62,7 +62,7 @@ class QFactoryLoaderPrivate : public QObjectPrivate
|
|||||||
public:
|
public:
|
||||||
QFactoryLoaderPrivate(){}
|
QFactoryLoaderPrivate(){}
|
||||||
QByteArray iid;
|
QByteArray iid;
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
~QFactoryLoaderPrivate();
|
~QFactoryLoaderPrivate();
|
||||||
mutable QMutex mutex;
|
mutable QMutex mutex;
|
||||||
QList<QLibraryPrivate*> libraryList;
|
QList<QLibraryPrivate*> libraryList;
|
||||||
@ -73,7 +73,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(QList<QFactoryLoader *>, qt_factory_loaders)
|
Q_GLOBAL_STATIC(QList<QFactoryLoader *>, qt_factory_loaders)
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ void QFactoryLoader::refreshAll()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
QFactoryLoader::QFactoryLoader(const char *iid,
|
QFactoryLoader::QFactoryLoader(const char *iid,
|
||||||
const QString &suffix,
|
const QString &suffix,
|
||||||
@ -242,7 +242,7 @@ QFactoryLoader::QFactoryLoader(const char *iid,
|
|||||||
moveToThread(QCoreApplicationPrivate::mainThread());
|
moveToThread(QCoreApplicationPrivate::mainThread());
|
||||||
Q_D(QFactoryLoader);
|
Q_D(QFactoryLoader);
|
||||||
d->iid = iid;
|
d->iid = iid;
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
d->cs = cs;
|
d->cs = cs;
|
||||||
d->suffix = suffix;
|
d->suffix = suffix;
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ QList<QJsonObject> QFactoryLoader::metaData() const
|
|||||||
{
|
{
|
||||||
Q_D(const QFactoryLoader);
|
Q_D(const QFactoryLoader);
|
||||||
QList<QJsonObject> metaData;
|
QList<QJsonObject> metaData;
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
QMutexLocker locker(&d->mutex);
|
QMutexLocker locker(&d->mutex);
|
||||||
for (int i = 0; i < d->libraryList.size(); ++i)
|
for (int i = 0; i < d->libraryList.size(); ++i)
|
||||||
metaData.append(d->libraryList.at(i)->metaData);
|
metaData.append(d->libraryList.at(i)->metaData);
|
||||||
@ -281,7 +281,7 @@ QObject *QFactoryLoader::instance(int index) const
|
|||||||
if (index < 0)
|
if (index < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
QMutexLocker lock(&d->mutex);
|
QMutexLocker lock(&d->mutex);
|
||||||
if (index < d->libraryList.size()) {
|
if (index < d->libraryList.size()) {
|
||||||
QLibraryPrivate *library = d->libraryList.at(index);
|
QLibraryPrivate *library = d->libraryList.at(index);
|
||||||
|
@ -60,7 +60,9 @@
|
|||||||
#include "QtCore/qjsondocument.h"
|
#include "QtCore/qjsondocument.h"
|
||||||
#include "QtCore/qmap.h"
|
#include "QtCore/qmap.h"
|
||||||
#include "QtCore/qendian.h"
|
#include "QtCore/qendian.h"
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include "private/qlibrary_p.h"
|
#include "private/qlibrary_p.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -84,7 +86,7 @@ public:
|
|||||||
const QString &suffix = QString(),
|
const QString &suffix = QString(),
|
||||||
Qt::CaseSensitivity = Qt::CaseSensitive);
|
Qt::CaseSensitivity = Qt::CaseSensitive);
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
~QFactoryLoader();
|
~QFactoryLoader();
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
@ -93,7 +95,7 @@ public:
|
|||||||
#if defined(Q_OS_UNIX) && !defined (Q_OS_MAC)
|
#if defined(Q_OS_UNIX) && !defined (Q_OS_MAC)
|
||||||
QLibraryPrivate *library(const QString &key) const;
|
QLibraryPrivate *library(const QString &key) const;
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
#endif // Q_OS_UNIX && !Q_OS_MAC
|
||||||
#endif // !QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
QMultiMap<int, QString> keyMap() const;
|
QMultiMap<int, QString> keyMap() const;
|
||||||
int indexOf(const QString &needle) const;
|
int indexOf(const QString &needle) const;
|
||||||
|
@ -40,8 +40,6 @@
|
|||||||
#include "qplatformdefs.h"
|
#include "qplatformdefs.h"
|
||||||
#include "qlibrary.h"
|
#include "qlibrary.h"
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
|
|
||||||
#include "qfactoryloader_p.h"
|
#include "qfactoryloader_p.h"
|
||||||
#include "qlibrary_p.h"
|
#include "qlibrary_p.h"
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
@ -1131,5 +1129,3 @@ bool qt_debug_component()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
@ -42,9 +42,9 @@
|
|||||||
|
|
||||||
#include <QtCore/qobject.h>
|
#include <QtCore/qobject.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_REQUIRE_CONFIG(library);
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QLibraryPrivate;
|
class QLibraryPrivate;
|
||||||
|
|
||||||
@ -99,8 +99,6 @@ private:
|
|||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QLibrary::LoadHints)
|
Q_DECLARE_OPERATORS_FOR_FLAGS(QLibrary::LoadHints)
|
||||||
|
|
||||||
#endif //QT_NO_LIBRARY
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif //QLIBRARY_H
|
#endif //QLIBRARY_H
|
||||||
|
@ -62,11 +62,10 @@
|
|||||||
# include "QtCore/qt_windows.h"
|
# include "QtCore/qt_windows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(library);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
|
|
||||||
|
|
||||||
bool qt_debug_component();
|
bool qt_debug_component();
|
||||||
|
|
||||||
class QLibraryStore;
|
class QLibraryStore;
|
||||||
@ -130,8 +129,6 @@ private:
|
|||||||
friend class QLibraryStore;
|
friend class QLibraryStore;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QLIBRARY_P_H
|
#endif // QLIBRARY_P_H
|
||||||
|
@ -44,8 +44,6 @@
|
|||||||
#include <qcoreapplication.h>
|
#include <qcoreapplication.h>
|
||||||
#include <private/qfilesystementry_p.h>
|
#include <private/qfilesystementry_p.h>
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
# include <private/qcore_mac_p.h>
|
# include <private/qcore_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
@ -308,5 +306,3 @@ QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
@ -44,8 +44,6 @@
|
|||||||
#include "qfileinfo.h"
|
#include "qfileinfo.h"
|
||||||
#include <private/qfilesystementry_p.h>
|
#include <private/qfilesystementry_p.h>
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
|
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -174,5 +172,3 @@ QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol)
|
|||||||
return QFunctionPointer(address);
|
return QFunctionPointer(address);
|
||||||
}
|
}
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include "qmachparser_p.h"
|
#include "qmachparser_p.h"
|
||||||
|
|
||||||
#if defined(Q_OF_MACH_O) && !defined(QT_NO_LIBRARY)
|
#if defined(Q_OF_MACH_O)
|
||||||
|
|
||||||
#include <qendian.h>
|
#include <qendian.h>
|
||||||
#include "qlibrary_p.h"
|
#include "qlibrary_p.h"
|
||||||
|
@ -54,7 +54,8 @@
|
|||||||
#include <qendian.h>
|
#include <qendian.h>
|
||||||
#include <private/qglobal_p.h>
|
#include <private/qglobal_p.h>
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
QT_REQUIRE_CONFIG(library);
|
||||||
|
|
||||||
#if defined(Q_OF_MACH_O)
|
#if defined(Q_OF_MACH_O)
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -72,6 +73,5 @@ public:
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
#endif // QT_NO_LIBRARY
|
|
||||||
|
|
||||||
#endif // QMACHPARSER_P_H
|
#endif // QMACHPARSER_P_H
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class QPluginLoader
|
\class QPluginLoader
|
||||||
@ -417,7 +417,7 @@ QLibrary::LoadHints QPluginLoader::loadHints() const
|
|||||||
return d ? d->loadHints() : QLibrary::LoadHints();
|
return d ? d->loadHints() : QLibrary::LoadHints();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
typedef QVector<QStaticPlugin> StaticPluginList;
|
typedef QVector<QStaticPlugin> StaticPluginList;
|
||||||
Q_GLOBAL_STATIC(StaticPluginList, staticPluginList)
|
Q_GLOBAL_STATIC(StaticPluginList, staticPluginList)
|
||||||
|
@ -40,12 +40,15 @@
|
|||||||
#ifndef QPLUGINLOADER_H
|
#ifndef QPLUGINLOADER_H
|
||||||
#define QPLUGINLOADER_H
|
#define QPLUGINLOADER_H
|
||||||
|
|
||||||
|
#include <QtCore/qglobal.h>
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include <QtCore/qlibrary.h>
|
#include <QtCore/qlibrary.h>
|
||||||
|
#endif
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
|
|
||||||
class QLibraryPrivate;
|
class QLibraryPrivate;
|
||||||
class QJsonObject;
|
class QJsonObject;
|
||||||
@ -93,7 +96,7 @@ public:
|
|||||||
static QVector<QStaticPlugin> staticPlugins();
|
static QVector<QStaticPlugin> staticPlugins();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
@ -40,7 +40,9 @@
|
|||||||
#include "qharfbuzz_p.h"
|
#include "qharfbuzz_p.h"
|
||||||
|
|
||||||
#include "qunicodetables_p.h"
|
#include "qunicodetables_p.h"
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include "qlibrary.h"
|
#include "qlibrary.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
@ -70,7 +72,7 @@ HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch)
|
|||||||
|
|
||||||
void (*HB_Library_Resolve(const char *library, int version, const char *symbol))()
|
void (*HB_Library_Resolve(const char *library, int version, const char *symbol))()
|
||||||
{
|
{
|
||||||
#ifdef QT_NO_LIBRARY
|
#if !QT_CONFIG(library)
|
||||||
Q_UNUSED(library);
|
Q_UNUSED(library);
|
||||||
Q_UNUSED(version);
|
Q_UNUSED(version);
|
||||||
Q_UNUSED(symbol);
|
Q_UNUSED(symbol);
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qglobal.h"
|
#include "qglobal.h"
|
||||||
#include "qlibrary.h"
|
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include "qlocale_p.h"
|
#include "qlocale_p.h"
|
||||||
#include "qmutex.h"
|
#include "qmutex.h"
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
#ifndef QT_BOOTSTRAPPED
|
#if QT_CONFIG(library)
|
||||||
#include <QtCore/qlibrary.h>
|
#include <QtCore/qlibrary.h>
|
||||||
#endif
|
#endif
|
||||||
#include <QtCore/qmutex.h>
|
#include <QtCore/qmutex.h>
|
||||||
@ -54,7 +54,7 @@ void (*qdbus_resolve_me(const char *name))();
|
|||||||
|
|
||||||
#if !defined QT_LINKED_LIBDBUS
|
#if !defined QT_LINKED_LIBDBUS
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
static QLibrary *qdbus_libdbus = 0;
|
static QLibrary *qdbus_libdbus = 0;
|
||||||
|
|
||||||
void qdbus_unloadLibDBus()
|
void qdbus_unloadLibDBus()
|
||||||
@ -71,7 +71,7 @@ void qdbus_unloadLibDBus()
|
|||||||
|
|
||||||
bool qdbus_loadLibDBus()
|
bool qdbus_loadLibDBus()
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
#ifdef QT_BUILD_INTERNAL
|
#ifdef QT_BUILD_INTERNAL
|
||||||
// this is to simulate a library load failure for our autotest suite.
|
// this is to simulate a library load failure for our autotest suite.
|
||||||
if (!qEnvironmentVariableIsEmpty("QT_SIMULATE_DBUS_LIBFAIL"))
|
if (!qEnvironmentVariableIsEmpty("QT_SIMULATE_DBUS_LIBFAIL"))
|
||||||
@ -126,7 +126,7 @@ bool qdbus_loadLibDBus()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
void (*qdbus_resolve_conditionally(const char *name))()
|
void (*qdbus_resolve_conditionally(const char *name))()
|
||||||
{
|
{
|
||||||
if (qdbus_loadLibDBus())
|
if (qdbus_loadLibDBus())
|
||||||
@ -137,7 +137,7 @@ void (*qdbus_resolve_conditionally(const char *name))()
|
|||||||
|
|
||||||
void (*qdbus_resolve_me(const char *name))()
|
void (*qdbus_resolve_me(const char *name))()
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
if (Q_UNLIKELY(!qdbus_loadLibDBus()))
|
if (Q_UNLIKELY(!qdbus_loadLibDBus()))
|
||||||
qFatal("Cannot find libdbus-1 in your system to resolve symbol '%s'.", name);
|
qFatal("Cannot find libdbus-1 in your system to resolve symbol '%s'.", name);
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ static void qdbus_unloadLibDBus()
|
|||||||
|
|
||||||
#endif // !QT_LINKED_LIBDBUS
|
#endif // !QT_LINKED_LIBDBUS
|
||||||
|
|
||||||
#if defined(QT_LINKED_LIBDBUS) || !defined(QT_NO_LIBRARY)
|
#if defined(QT_LINKED_LIBDBUS) || QT_CONFIG(library)
|
||||||
Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus)
|
Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1772,7 +1772,7 @@ static QDBusConnection::ConnectionCapabilities connectionCapabilies(DBusConnecti
|
|||||||
# if DBUS_VERSION-0 >= 0x010400
|
# if DBUS_VERSION-0 >= 0x010400
|
||||||
can_send_type = dbus_connection_can_send_type;
|
can_send_type = dbus_connection_can_send_type;
|
||||||
# endif
|
# endif
|
||||||
#elif !defined(QT_NO_LIBRARY)
|
#elif QT_CONFIG(library)
|
||||||
// run-time check if the next functions are available
|
// run-time check if the next functions are available
|
||||||
can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type");
|
can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type");
|
||||||
#endif
|
#endif
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
#include <QtCore/QLibrary>
|
#include <QtCore/QLibrary>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1449,7 +1449,7 @@ void QGuiApplicationPrivate::init()
|
|||||||
session_manager = new QSessionManager(q, session_id, session_key);
|
session_manager = new QSessionManager(q, session_id, session_key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
if (qEnvironmentVariableIntValue("QT_LOAD_TESTABILITY") > 0)
|
if (qEnvironmentVariableIntValue("QT_LOAD_TESTABILITY") > 0)
|
||||||
loadTestability = true;
|
loadTestability = true;
|
||||||
|
|
||||||
@ -1469,7 +1469,7 @@ void QGuiApplicationPrivate::init()
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(loadTestability);
|
Q_UNUSED(loadTestability);
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
if (layout_direction == Qt::LayoutDirectionAuto || force_reverse)
|
if (layout_direction == Qt::LayoutDirectionAuto || force_reverse)
|
||||||
QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
|
QGuiApplication::setLayoutDirection(qt_detectRTLLanguage() ? Qt::RightToLeft : Qt::LeftToRight);
|
||||||
|
@ -51,14 +51,14 @@ QT_BEGIN_NAMESPACE
|
|||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||||
(QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive))
|
(QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive))
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
||||||
(QPlatformIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
(QPlatformIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
||||||
#endif // !QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList ¶mList, int &argc, char **argv, const QString &platformPluginPath)
|
QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList ¶mList, int &argc, char **argv, const QString &platformPluginPath)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
// Try loading the plugin from platformPluginPath first:
|
// Try loading the plugin from platformPluginPath first:
|
||||||
if (!platformPluginPath.isEmpty()) {
|
if (!platformPluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(platformPluginPath);
|
QCoreApplication::addLibraryPath(platformPluginPath);
|
||||||
@ -81,7 +81,7 @@ QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platfor
|
|||||||
QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath)
|
QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath)
|
||||||
{
|
{
|
||||||
QStringList list;
|
QStringList list;
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
if (!platformPluginPath.isEmpty()) {
|
if (!platformPluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(platformPluginPath);
|
QCoreApplication::addLibraryPath(platformPluginPath);
|
||||||
list = directLoader()->keyMap().values();
|
list = directLoader()->keyMap().values();
|
||||||
|
@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||||
(QPlatformThemeFactoryInterface_iid, QLatin1String("/platformthemes"), Qt::CaseInsensitive))
|
(QPlatformThemeFactoryInterface_iid, QLatin1String("/platformthemes"), Qt::CaseInsensitive))
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
||||||
(QPlatformThemeFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
(QPlatformThemeFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
||||||
#endif
|
#endif
|
||||||
@ -60,7 +60,7 @@ QPlatformTheme *QPlatformThemeFactory::create(const QString& key, const QString
|
|||||||
{
|
{
|
||||||
QStringList paramList = key.split(QLatin1Char(':'));
|
QStringList paramList = key.split(QLatin1Char(':'));
|
||||||
const QString platform = paramList.takeFirst().toLower();
|
const QString platform = paramList.takeFirst().toLower();
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
// Try loading the plugin from platformPluginPath first:
|
// Try loading the plugin from platformPluginPath first:
|
||||||
if (!platformPluginPath.isEmpty()) {
|
if (!platformPluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(platformPluginPath);
|
QCoreApplication::addLibraryPath(platformPluginPath);
|
||||||
@ -83,7 +83,7 @@ QStringList QPlatformThemeFactory::keys(const QString &platformPluginPath)
|
|||||||
{
|
{
|
||||||
QStringList list;
|
QStringList list;
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
if (!platformPluginPath.isEmpty()) {
|
if (!platformPluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(platformPluginPath);
|
QCoreApplication::addLibraryPath(platformPluginPath);
|
||||||
list += directLoader()->keyMap().values();
|
list += directLoader()->keyMap().values();
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
#include <private/qfont_p.h>
|
#include <private/qfont_p.h>
|
||||||
|
|
||||||
#include <qwindow.h>
|
#include <qwindow.h>
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qimage.h>
|
#include <qimage.h>
|
||||||
#include <QtCore/qbytearray.h>
|
#include <QtCore/qbytearray.h>
|
||||||
|
|
||||||
|
@ -39,7 +39,9 @@
|
|||||||
|
|
||||||
#include "qdnslookup_p.h"
|
#include "qdnslookup_p.h"
|
||||||
|
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include <qlibrary.h>
|
#include <qlibrary.h>
|
||||||
|
#endif
|
||||||
#include <qscopedpointer.h>
|
#include <qscopedpointer.h>
|
||||||
#include <qurl.h>
|
#include <qurl.h>
|
||||||
#include <private/qnativesocketengine_p.h>
|
#include <private/qnativesocketengine_p.h>
|
||||||
@ -58,7 +60,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
|
|
||||||
#if defined(Q_OS_OPENBSD)
|
#if defined(Q_OS_OPENBSD)
|
||||||
typedef struct __res_state* res_state;
|
typedef struct __res_state* res_state;
|
||||||
@ -382,6 +384,6 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ifndef QT_NO_LIBRARY */
|
#endif /* QT_CONFIG(library) */
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -45,7 +45,9 @@
|
|||||||
#include "private/qnativesocketengine_p.h"
|
#include "private/qnativesocketengine_p.h"
|
||||||
#include "qiodevice.h"
|
#include "qiodevice.h"
|
||||||
#include <qbytearray.h>
|
#include <qbytearray.h>
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include <qlibrary.h>
|
#include <qlibrary.h>
|
||||||
|
#endif
|
||||||
#include <qbasicatomic.h>
|
#include <qbasicatomic.h>
|
||||||
#include <qurl.h>
|
#include <qurl.h>
|
||||||
#include <qfile.h>
|
#include <qfile.h>
|
||||||
@ -93,7 +95,7 @@ static res_state_ptr local_res = 0;
|
|||||||
|
|
||||||
static bool resolveLibraryInternal()
|
static bool resolveLibraryInternal()
|
||||||
{
|
{
|
||||||
#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_QNX)
|
#if QT_CONFIG(library) && !defined(Q_OS_QNX)
|
||||||
QLibrary lib;
|
QLibrary lib;
|
||||||
#ifdef LIBRESOLV_SO
|
#ifdef LIBRESOLV_SO
|
||||||
lib.setFileName(QStringLiteral(LIBRESOLV_SO));
|
lib.setFileName(QStringLiteral(LIBRESOLV_SO));
|
||||||
|
@ -78,7 +78,6 @@
|
|||||||
#include <QtCore/qthread.h>
|
#include <QtCore/qthread.h>
|
||||||
#include <QtCore/qurl.h>
|
#include <QtCore/qurl.h>
|
||||||
#include <QtCore/qvarlengtharray.h>
|
#include <QtCore/qvarlengtharray.h>
|
||||||
#include <QLibrary> // for loading the security lib for the CA store
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -530,7 +529,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
|
|||||||
resetDefaultCiphers();
|
resetDefaultCiphers();
|
||||||
resetDefaultEllipticCurves();
|
resetDefaultEllipticCurves();
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
//load symbols needed to receive certificates from system store
|
//load symbols needed to receive certificates from system store
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
HINSTANCE hLib = LoadLibraryW(L"Crypt32");
|
HINSTANCE hLib = LoadLibraryW(L"Crypt32");
|
||||||
@ -558,7 +557,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif //QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
// if on-demand loading was not enabled, load the certs now
|
// if on-demand loading was not enabled, load the certs now
|
||||||
if (!s_loadRootCertsOnDemand)
|
if (!s_loadRootCertsOnDemand)
|
||||||
setDefaultCaCertificates(systemCaCertificates());
|
setDefaultCaCertificates(systemCaCertificates());
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include <private/qsystemlibrary_p.h>
|
# include <private/qsystemlibrary_p.h>
|
||||||
#else
|
#elif QT_CONFIG(library)
|
||||||
# include <QtCore/qlibrary.h>
|
# include <QtCore/qlibrary.h>
|
||||||
#endif
|
#endif
|
||||||
#include <QtCore/qmutex.h>
|
#include <QtCore/qmutex.h>
|
||||||
@ -125,7 +125,7 @@ void qsslSocketUnresolvedSymbolWarning(const char *functionName)
|
|||||||
qCWarning(lcSsl, "QSslSocket: cannot call unresolved function %s", functionName);
|
qCWarning(lcSsl, "QSslSocket: cannot call unresolved function %s", functionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
void qsslSocketCannotResolveSymbolWarning(const char *functionName)
|
void qsslSocketCannotResolveSymbolWarning(const char *functionName)
|
||||||
{
|
{
|
||||||
qCWarning(lcSsl, "QSslSocket: cannot resolve %s", functionName);
|
qCWarning(lcSsl, "QSslSocket: cannot resolve %s", functionName);
|
||||||
@ -468,12 +468,11 @@ DEFINEFUNC(void, PKCS12_free, PKCS12 *pkcs12, pkcs12, return, DUMMYARG)
|
|||||||
|
|
||||||
#if !defined QT_LINKED_OPENSSL
|
#if !defined QT_LINKED_OPENSSL
|
||||||
|
|
||||||
#ifdef QT_NO_LIBRARY
|
#if !QT_CONFIG(library)
|
||||||
bool q_resolveOpenSslSymbols()
|
bool q_resolveOpenSslSymbols()
|
||||||
{
|
{
|
||||||
qCWarning(lcSsl, "QSslSocket: unable to resolve symbols. "
|
qCWarning(lcSsl, "QSslSocket: unable to resolve symbols. Qt is configured without the "
|
||||||
"QT_NO_LIBRARY is defined which means runtime resolving of "
|
"'library' feature, which means runtime resolving of libraries won't work.");
|
||||||
"libraries won't work.");
|
|
||||||
qCWarning(lcSsl, "Either compile Qt statically or with support for runtime resolving "
|
qCWarning(lcSsl, "Either compile Qt statically or with support for runtime resolving "
|
||||||
"of libraries.");
|
"of libraries.");
|
||||||
return false;
|
return false;
|
||||||
@ -1034,7 +1033,7 @@ bool q_resolveOpenSslSymbols()
|
|||||||
delete libs.second;
|
delete libs.second;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
#else // !defined QT_LINKED_OPENSSL
|
#else // !defined QT_LINKED_OPENSSL
|
||||||
|
|
||||||
|
@ -65,7 +65,6 @@
|
|||||||
#include <private/qimagepixmapcleanuphooks_p.h>
|
#include <private/qimagepixmapcleanuphooks_p.h>
|
||||||
#include "qcolormap.h"
|
#include "qcolormap.h"
|
||||||
#include "qfile.h"
|
#include "qfile.h"
|
||||||
#include "qlibrary.h"
|
|
||||||
#include <qmutex.h>
|
#include <qmutex.h>
|
||||||
|
|
||||||
#include "qsurfaceformat.h"
|
#include "qsurfaceformat.h"
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include <private/qfont_p.h>
|
#include <private/qfont_p.h>
|
||||||
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
|
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
|
||||||
|
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qimage.h>
|
#include <qimage.h>
|
||||||
#include <qwindow.h>
|
#include <qwindow.h>
|
||||||
|
|
||||||
|
@ -69,16 +69,16 @@ Q_LOGGING_CATEGORY(qLcEglDevDebug, "qt.qpa.egldeviceintegration")
|
|||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||||
(QEglFSDeviceIntegrationFactoryInterface_iid, QLatin1String("/egldeviceintegrations"), Qt::CaseInsensitive))
|
(QEglFSDeviceIntegrationFactoryInterface_iid, QLatin1String("/egldeviceintegrations"), Qt::CaseInsensitive))
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
||||||
(QEglFSDeviceIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
(QEglFSDeviceIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
||||||
|
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
QStringList QEglFSDeviceIntegrationFactory::keys(const QString &pluginPath)
|
QStringList QEglFSDeviceIntegrationFactory::keys(const QString &pluginPath)
|
||||||
{
|
{
|
||||||
QStringList list;
|
QStringList list;
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
if (!pluginPath.isEmpty()) {
|
if (!pluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(pluginPath);
|
QCoreApplication::addLibraryPath(pluginPath);
|
||||||
list = directLoader()->keyMap().values();
|
list = directLoader()->keyMap().values();
|
||||||
@ -102,7 +102,7 @@ QStringList QEglFSDeviceIntegrationFactory::keys(const QString &pluginPath)
|
|||||||
QEglFSDeviceIntegration *QEglFSDeviceIntegrationFactory::create(const QString &key, const QString &pluginPath)
|
QEglFSDeviceIntegration *QEglFSDeviceIntegrationFactory::create(const QString &key, const QString &pluginPath)
|
||||||
{
|
{
|
||||||
QEglFSDeviceIntegration *integration = Q_NULLPTR;
|
QEglFSDeviceIntegration *integration = Q_NULLPTR;
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
if (!pluginPath.isEmpty()) {
|
if (!pluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(pluginPath);
|
QCoreApplication::addLibraryPath(pluginPath);
|
||||||
integration = qLoadPlugin<QEglFSDeviceIntegration, QEglFSDeviceIntegrationPlugin>(directLoader(), key);
|
integration = qLoadPlugin<QEglFSDeviceIntegration, QEglFSDeviceIntegrationPlugin>(directLoader(), key);
|
||||||
|
@ -50,14 +50,14 @@ QT_BEGIN_NAMESPACE
|
|||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||||
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive))
|
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive))
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
||||||
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
||||||
#endif // !QT_NO_LIBRARY
|
#endif // QT_CONFIG(library)
|
||||||
|
|
||||||
QXcbGlIntegration *QXcbGlIntegrationFactory::create(const QString &platform, const QString &pluginPath)
|
QXcbGlIntegration *QXcbGlIntegrationFactory::create(const QString &platform, const QString &pluginPath)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
// Try loading the plugin from pluginPath first:
|
// Try loading the plugin from pluginPath first:
|
||||||
if (!pluginPath.isEmpty()) {
|
if (!pluginPath.isEmpty()) {
|
||||||
QCoreApplication::addLibraryPath(pluginPath);
|
QCoreApplication::addLibraryPath(pluginPath);
|
||||||
|
@ -38,7 +38,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include <QLibrary>
|
#include <QLibrary>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "qxcbwindow.h"
|
#include "qxcbwindow.h"
|
||||||
#include "qxcbscreen.h"
|
#include "qxcbscreen.h"
|
||||||
@ -573,7 +575,7 @@ QFunctionPointer QGLXContext::getProcAddress(const char *procName)
|
|||||||
if (!glXGetProcAddressARB)
|
if (!glXGetProcAddressARB)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
extern const QString qt_gl_library_name();
|
extern const QString qt_gl_library_name();
|
||||||
// QLibrary lib(qt_gl_library_name());
|
// QLibrary lib(qt_gl_library_name());
|
||||||
QLibrary lib(QLatin1String("GL"));
|
QLibrary lib(QLatin1String("GL"));
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
#include "qxcbimage.h"
|
#include "qxcbimage.h"
|
||||||
#include "qxcbxsettings.h"
|
#include "qxcbxsettings.h"
|
||||||
|
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include <QtCore/QLibrary>
|
#include <QtCore/QLibrary>
|
||||||
|
#endif
|
||||||
#include <QtGui/QWindow>
|
#include <QtGui/QWindow>
|
||||||
#include <QtGui/QBitmap>
|
#include <QtGui/QBitmap>
|
||||||
#include <QtGui/private/qguiapplication_p.h>
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
@ -58,7 +60,7 @@ typedef char *(*PtrXcursorLibraryGetTheme)(void *);
|
|||||||
typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);
|
typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *);
|
||||||
typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);
|
typedef int (*PtrXcursorLibraryGetDefaultSize)(void *);
|
||||||
|
|
||||||
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
enum {
|
enum {
|
||||||
XCursorShape = CursorShape
|
XCursorShape = CursorShape
|
||||||
@ -306,7 +308,7 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
|
|||||||
const char *cursorStr = "cursor";
|
const char *cursorStr = "cursor";
|
||||||
xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr);
|
xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr);
|
||||||
|
|
||||||
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||||
static bool function_ptrs_not_initialized = true;
|
static bool function_ptrs_not_initialized = true;
|
||||||
if (function_ptrs_not_initialized) {
|
if (function_ptrs_not_initialized) {
|
||||||
QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
|
QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
|
||||||
@ -507,7 +509,7 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
|
|||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||||
bool updateCursorTheme(void *dpy, const QByteArray &theme) {
|
bool updateCursorTheme(void *dpy, const QByteArray &theme) {
|
||||||
if (!ptrXcursorLibraryGetTheme
|
if (!ptrXcursorLibraryGetTheme
|
||||||
|| !ptrXcursorLibrarySetTheme)
|
|| !ptrXcursorLibrarySetTheme)
|
||||||
@ -551,7 +553,7 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
|
|||||||
}
|
}
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
#endif //XCB_USE_XLIB / QT_NO_LIBRARY
|
#endif // XCB_USE_XLIB / QT_CONFIG(library)
|
||||||
|
|
||||||
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
||||||
{
|
{
|
||||||
@ -560,7 +562,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
|||||||
xcb_cursor_t cursor = XCB_NONE;
|
xcb_cursor_t cursor = XCB_NONE;
|
||||||
|
|
||||||
// Try Xcursor first
|
// Try Xcursor first
|
||||||
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||||
if (cshape >= 0 && cshape <= Qt::LastCursor) {
|
if (cshape >= 0 && cshape <= Qt::LastCursor) {
|
||||||
void *dpy = connection()->xlib_display();
|
void *dpy = connection()->xlib_display();
|
||||||
// special case for non-standard dnd-* cursors
|
// special case for non-standard dnd-* cursors
|
||||||
|
@ -101,7 +101,7 @@ private:
|
|||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
CursorHash m_cursorHash;
|
CursorHash m_cursorHash;
|
||||||
#endif
|
#endif
|
||||||
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
#if defined(XCB_USE_XLIB) && QT_CONFIG(library)
|
||||||
static void cursorThemePropertyChanged(QXcbVirtualDesktop *screen,
|
static void cursorThemePropertyChanged(QXcbVirtualDesktop *screen,
|
||||||
const QByteArray &name,
|
const QByteArray &name,
|
||||||
const QVariant &property,
|
const QVariant &property,
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
#include <qsplitter.h>
|
#include <qsplitter.h>
|
||||||
#include <qprogressbar.h>
|
#include <qprogressbar.h>
|
||||||
#include <qwizard.h>
|
#include <qwizard.h>
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qdrawutil.h>
|
#include <qdrawutil.h>
|
||||||
#include <private/qstylehelper_p.h>
|
#include <private/qstylehelper_p.h>
|
||||||
#include <private/qdrawhelper_p.h>
|
#include <private/qdrawhelper_p.h>
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
#include <qtableview.h>
|
#include <qtableview.h>
|
||||||
#include <qwizard.h>
|
#include <qwizard.h>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qdatetimeedit.h>
|
#include <qdatetimeedit.h>
|
||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
#include <qpair.h>
|
#include <qpair.h>
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
#include <private/qwindowsxpstyle_p_p.h>
|
#include <private/qwindowsxpstyle_p_p.h>
|
||||||
#include <private/qstyleanimation_p.h>
|
#include <private/qstyleanimation_p.h>
|
||||||
#include <private/qpaintengine_raster_p.h>
|
#include <private/qpaintengine_raster_p.h>
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qpaintengine.h>
|
#include <qpaintengine.h>
|
||||||
#include <qwidget.h>
|
#include <qwidget.h>
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
|
@ -65,7 +65,6 @@
|
|||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
# include <qlibrary.h>
|
|
||||||
# include <qt_windows.h>
|
# include <qt_windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include <qfile.h>
|
#include <qfile.h>
|
||||||
#include <qdir.h>
|
#include <qdir.h>
|
||||||
#include <qcoreapplication.h>
|
#include <qcoreapplication.h>
|
||||||
#include <qlibrary.h>
|
|
||||||
#include <qtemporaryfile.h>
|
#include <qtemporaryfile.h>
|
||||||
#include <qtemporarydir.h>
|
#include <qtemporarydir.h>
|
||||||
#include <qdir.h>
|
#include <qdir.h>
|
||||||
|
@ -893,7 +893,7 @@ void tst_QCoreApplication::threadedEventDelivery()
|
|||||||
QCOMPARE(receiver.recordedEvents.contains(QEvent::User + 1), eventsReceived);
|
QCOMPARE(receiver.recordedEvents.contains(QEvent::User + 1), eventsReceived);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
void tst_QCoreApplication::addRemoveLibPaths()
|
void tst_QCoreApplication::addRemoveLibPaths()
|
||||||
{
|
{
|
||||||
QStringList paths = QCoreApplication::libraryPaths();
|
QStringList paths = QCoreApplication::libraryPaths();
|
||||||
|
@ -58,7 +58,7 @@ private slots:
|
|||||||
void applicationEventFilters_auxThread();
|
void applicationEventFilters_auxThread();
|
||||||
void threadedEventDelivery_data();
|
void threadedEventDelivery_data();
|
||||||
void threadedEventDelivery();
|
void threadedEventDelivery();
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
void addRemoveLibPaths();
|
void addRemoveLibPaths();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -29,11 +29,12 @@
|
|||||||
#include <QtTest/qtest.h>
|
#include <QtTest/qtest.h>
|
||||||
#include <QtCore/qdir.h>
|
#include <QtCore/qdir.h>
|
||||||
#include <QtCore/qfileinfo.h>
|
#include <QtCore/qfileinfo.h>
|
||||||
|
#include <QtCore/qplugin.h>
|
||||||
#include <private/qfactoryloader_p.h>
|
#include <private/qfactoryloader_p.h>
|
||||||
#include "plugin1/plugininterface1.h"
|
#include "plugin1/plugininterface1.h"
|
||||||
#include "plugin2/plugininterface2.h"
|
#include "plugin2/plugininterface2.h"
|
||||||
|
|
||||||
#ifdef QT_NO_LIBRARY
|
#if !QT_CONFIG(library)
|
||||||
Q_IMPORT_PLUGIN(Plugin1)
|
Q_IMPORT_PLUGIN(Plugin1)
|
||||||
Q_IMPORT_PLUGIN(Plugin2)
|
Q_IMPORT_PLUGIN(Plugin2)
|
||||||
#endif
|
#endif
|
||||||
@ -54,7 +55,7 @@ void tst_QFactoryLoader::initTestCase()
|
|||||||
{
|
{
|
||||||
const QString binFolder = QFINDTESTDATA(binFolderC);
|
const QString binFolder = QFINDTESTDATA(binFolderC);
|
||||||
QVERIFY2(!binFolder.isEmpty(), "Unable to locate 'bin' folder");
|
QVERIFY2(!binFolder.isEmpty(), "Unable to locate 'bin' folder");
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
QCoreApplication::setLibraryPaths(QStringList(QFileInfo(binFolder).absolutePath()));
|
QCoreApplication::setLibraryPaths(QStringList(QFileInfo(binFolder).absolutePath()));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -751,7 +751,9 @@ void tst_QTextBoundaryFinder::isAtSoftHyphen()
|
|||||||
doTestData(testString, expectedSoftHyphenPositions, QTextBoundaryFinder::Line, QTextBoundaryFinder::SoftHyphen);
|
doTestData(testString, expectedSoftHyphenPositions, QTextBoundaryFinder::Line, QTextBoundaryFinder::SoftHyphen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(library)
|
||||||
#include <qlibrary.h>
|
#include <qlibrary.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LIBTHAI_MAJOR 0
|
#define LIBTHAI_MAJOR 0
|
||||||
typedef int (*th_brk_def) (const unsigned char*, int*, size_t);
|
typedef int (*th_brk_def) (const unsigned char*, int*, size_t);
|
||||||
@ -759,7 +761,7 @@ static th_brk_def th_brk = 0;
|
|||||||
|
|
||||||
static bool init_libthai()
|
static bool init_libthai()
|
||||||
{
|
{
|
||||||
#if !defined(QT_NO_LIBRARY)
|
#if QT_CONFIG(library)
|
||||||
static bool triedResolve = false;
|
static bool triedResolve = false;
|
||||||
if (!triedResolve) {
|
if (!triedResolve) {
|
||||||
th_brk = (th_brk_def) QLibrary::resolve("thai", (int)LIBTHAI_MAJOR, "th_brk");
|
th_brk = (th_brk_def) QLibrary::resolve("thai", (int)LIBTHAI_MAJOR, "th_brk");
|
||||||
|
@ -1084,7 +1084,7 @@ static bool canSendUnixFd(DBusConnection *connection)
|
|||||||
# if DBUS_VERSION-0 >= 0x010400
|
# if DBUS_VERSION-0 >= 0x010400
|
||||||
can_send_type = dbus_connection_can_send_type;
|
can_send_type = dbus_connection_can_send_type;
|
||||||
# endif
|
# endif
|
||||||
#elif !defined(QT_NO_LIBRARY)
|
#elif QT_CONFIG(library)
|
||||||
// run-time check if the next functions are available
|
// run-time check if the next functions are available
|
||||||
can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type");
|
can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type");
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +90,7 @@ static void addFixedTypes()
|
|||||||
// the library recognizes this as valid type first.
|
// the library recognizes this as valid type first.
|
||||||
// The following function was added for Unix FD support, so if it is
|
// The following function was added for Unix FD support, so if it is
|
||||||
// present, so is support for Unix FDs.
|
// present, so is support for Unix FDs.
|
||||||
# ifndef QT_NO_LIBRARY
|
# if QT_CONFIG(library)
|
||||||
bool supportsUnixFds = qdbus_resolve_conditionally("dbus_connection_can_send_type");
|
bool supportsUnixFds = qdbus_resolve_conditionally("dbus_connection_can_send_type");
|
||||||
# else
|
# else
|
||||||
bool supportsUnixFds = false;
|
bool supportsUnixFds = false;
|
||||||
|
@ -54,7 +54,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <qlibrary.h>
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
|
@ -121,7 +121,7 @@ private slots:
|
|||||||
void testDeleteLater();
|
void testDeleteLater();
|
||||||
void testDeleteLaterProcessEvents();
|
void testDeleteLaterProcessEvents();
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
void libraryPaths();
|
void libraryPaths();
|
||||||
void libraryPaths_qt_plugin_path();
|
void libraryPaths_qt_plugin_path();
|
||||||
void libraryPaths_qt_plugin_path_2();
|
void libraryPaths_qt_plugin_path_2();
|
||||||
@ -885,7 +885,7 @@ bool isPathListIncluded(const QStringList &l, const QStringList &r)
|
|||||||
return j == r.count();
|
return j == r.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
#if QT_CONFIG(library)
|
||||||
#define QT_TST_QAPP_DEBUG
|
#define QT_TST_QAPP_DEBUG
|
||||||
void tst_QApplication::libraryPaths()
|
void tst_QApplication::libraryPaths()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user