summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/Qt5CoreMacros.cmake43
-rw-r--r--src/gui/image/qicon.cpp33
-rw-r--r--src/gui/image/qicon.h3
-rw-r--r--src/gui/image/qiconloader.cpp20
-rw-r--r--src/gui/image/qiconloader_p.h3
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp58
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h17
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp26
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h1
-rw-r--r--src/plugins/platforms/xcb/qxcbmain.cpp12
-rw-r--r--tests/auto/cmake/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/test_add_big_resource/CMakeLists.txt13
-rw-r--r--tests/auto/cmake/test_add_big_resource/myobject.cpp44
-rw-r--r--tests/auto/cmake/test_add_big_resource/myobject.h44
-rw-r--r--tests/auto/cmake/test_add_big_resource/resource_file.txt1
-rw-r--r--tests/auto/cmake/test_add_big_resource/resource_file2.txt1
-rw-r--r--tests/auto/cmake/test_add_big_resource/test_add_big_resource.qrc6
-rw-r--r--tests/auto/cmake/test_add_big_resource/test_add_big_resource2.qrc6
18 files changed, 285 insertions, 47 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 819b48f973..581c99ed58 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -293,6 +293,49 @@ function(QT5_ADD_RESOURCES outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+# qt5_add_big_resources(outfiles inputfile ... )
+
+function(QT5_ADD_BIG_RESOURCES outfiles )
+
+ set(options)
+ set(oneValueArgs)
+ set(multiValueArgs OPTIONS)
+
+ cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
+ set(rcc_options ${_RCC_OPTIONS})
+
+ if("${rcc_options}" MATCHES "-binary")
+ message(WARNING "Use qt5_add_binary_resources for binary option")
+ endif()
+
+ foreach(it ${rcc_files})
+ get_filename_component(outfilename ${it} NAME_WE)
+ get_filename_component(infile ${it} ABSOLUTE)
+ set(tmpoutfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}tmp.cpp)
+ set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.o)
+
+ _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
+ set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
+ add_custom_command(OUTPUT ${tmpoutfile}
+ COMMAND ${Qt5Core_RCC_EXECUTABLE} ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile}
+ DEPENDS ${infile} ${_rc_depends} "${out_depends}" VERBATIM)
+ set_source_files_properties(${tmpoutfile} PROPERTIES SKIP_AUTOMOC ON)
+ set_source_files_properties(${tmpoutfile} PROPERTIES SKIP_AUTOUIC ON)
+ add_custom_target(big_resources_${outfilename} ALL DEPENDS ${tmpoutfile})
+ add_library(rcc_object_${outfilename} OBJECT ${tmpoutfile})
+ add_dependencies(rcc_object_${outfilename} big_resources_${outfilename})
+ add_custom_command(OUTPUT ${outfile}
+ COMMAND ${Qt5Core_RCC_EXECUTABLE}
+ ARGS ${rcc_options} --name ${outfilename} --pass 2 --temp $<TARGET_OBJECTS:rcc_object_${outfilename}> --output ${outfile} ${infile}
+ DEPENDS rcc_object_${outfilename}
+ VERBATIM)
+ list(APPEND ${outfiles} ${outfile})
+ endforeach()
+ set(${outfiles} ${${outfiles}} PARENT_SCOPE)
+endfunction()
+
set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 32fa9e75ac..14a0248600 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1194,7 +1194,7 @@ void QIcon::setFallbackSearchPaths(const QStringList &paths)
The \a name should correspond to a directory name in the
themeSearchPath() containing an index.theme
- file describing it's contents.
+ file describing its contents.
\sa themeSearchPaths(), themeName()
*/
@@ -1220,6 +1220,37 @@ QString QIcon::themeName()
}
/*!
+ \since 5.12
+
+ Returns the name of the fallback icon theme.
+
+ On X11, if not set, the fallback icon theme depends on your desktop
+ settings. On other platforms it is not set by default.
+
+ \sa setFallbackThemeName(), themeName()
+*/
+QString QIcon::fallbackThemeName()
+{
+ return QIconLoader::instance()->fallbackThemeName();
+}
+
+/*!
+ \since 5.12
+
+ Sets the fallback icon theme to \a name.
+
+ The \a name should correspond to a directory name in the
+ themeSearchPath() containing an index.theme
+ file describing its contents.
+
+ \sa fallbackThemeName(), themeSearchPaths(), themeName()
+*/
+void QIcon::setFallbackThemeName(const QString &name)
+{
+ QIconLoader::instance()->setFallbackThemeName(name);
+}
+
+/*!
\since 4.6
Returns the QIcon corresponding to \a name in the current
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index 653ba6fda4..6a4fc8927a 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -124,6 +124,9 @@ public:
static QString themeName();
static void setThemeName(const QString &path);
+ static QString fallbackThemeName();
+ static void setFallbackThemeName(const QString &name);
+
Q_DUMMY_COMPARISON_OPERATOR(QIcon)
private:
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index 1ea4f1340b..228de3adc3 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance)
/* Theme to use in last resort, if the theme does not have the icon, neither the parents */
-static QString fallbackTheme()
+static QString systemFallbackThemeName()
{
if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) {
const QVariant themeHint = theme->themeHint(QPlatformTheme::SystemIconFallbackThemeName);
@@ -117,7 +117,7 @@ void QIconLoader::ensureInitialized()
m_systemTheme = systemThemeName();
if (m_systemTheme.isEmpty())
- m_systemTheme = fallbackTheme();
+ m_systemTheme = systemFallbackThemeName();
if (qt_iconEngineFactoryLoader()->keyMap().key(QLatin1String("svg"), -1) != -1)
m_supportsSvg = true;
}
@@ -137,7 +137,7 @@ void QIconLoader::updateSystemTheme()
if (m_userTheme.isEmpty()) {
QString theme = systemThemeName();
if (theme.isEmpty())
- theme = fallbackTheme();
+ theme = fallbackThemeName();
if (theme != m_systemTheme) {
m_systemTheme = theme;
invalidateKey();
@@ -151,6 +151,16 @@ void QIconLoader::setThemeName(const QString &themeName)
invalidateKey();
}
+QString QIconLoader::fallbackThemeName() const
+{
+ return m_userFallbackTheme.isEmpty() ? systemFallbackThemeName() : m_userFallbackTheme;
+}
+
+void QIconLoader::setFallbackThemeName(const QString &themeName)
+{
+ m_userFallbackTheme = themeName;
+}
+
void QIconLoader::setThemeSearchPath(const QStringList &searchPaths)
{
m_iconDirs = searchPaths;
@@ -388,7 +398,7 @@ QIconTheme::QIconTheme(const QString &themeName)
// Ensure a default platform fallback for all themes
if (m_parents.isEmpty()) {
- const QString fallback = fallbackTheme();
+ const QString fallback = QIconLoader::instance()->fallbackThemeName();
if (!fallback.isEmpty())
m_parents.append(fallback);
}
@@ -414,7 +424,7 @@ QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName,
if (!theme.isValid()) {
theme = QIconTheme(themeName);
if (!theme.isValid())
- theme = QIconTheme(fallbackTheme());
+ theme = QIconTheme(fallbackThemeName());
}
const QStringList contentDirs = theme.contentDirs();
diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h
index 746e871fb1..fac18b5d79 100644
--- a/src/gui/image/qiconloader_p.h
+++ b/src/gui/image/qiconloader_p.h
@@ -177,6 +177,8 @@ public:
QString themeName() const { return m_userTheme.isEmpty() ? m_systemTheme : m_userTheme; }
void setThemeName(const QString &themeName);
+ QString fallbackThemeName() const;
+ void setFallbackThemeName(const QString &themeName);
QIconTheme theme() { return themeList.value(themeName()); }
void setThemeSearchPath(const QStringList &searchPaths);
QStringList themeSearchPaths() const;
@@ -200,6 +202,7 @@ private:
bool m_initialized;
mutable QString m_userTheme;
+ mutable QString m_userFallbackTheme;
mutable QString m_systemTheme;
mutable QStringList m_iconDirs;
mutable QHash <QString, QIconTheme> themeList;
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 84551fd74b..48715e0812 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -544,31 +544,59 @@ void QXcbConnection::initializeScreens()
}
}
-QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName)
- : m_canGrabServer(canGrabServer)
- , m_defaultVisualId(defaultVisualId)
- , m_displayName(displayName ? QByteArray(displayName) : qgetenv("DISPLAY"))
- , m_nativeInterface(nativeInterface)
-{
+QXcbConnection *QXcbConnection::create(QXcbNativeInterface *nativeInterface, bool canGrabServer,
+ xcb_visualid_t defaultVisualId,
+ const char *displayNameIn)
+{
+ const QByteArray displayName = displayNameIn ? QByteArray(displayNameIn) : qgetenv("DISPLAY");
+ int primaryScreenNumber = 0;
+ void *xlibDisplay = nullptr;
+ xcb_connection_t *connection = nullptr;
#if QT_CONFIG(xcb_xlib)
- Display *dpy = XOpenDisplay(m_displayName.constData());
+ Display *dpy = XOpenDisplay(displayName.constData());
if (dpy) {
- m_primaryScreenNumber = DefaultScreen(dpy);
- m_connection = XGetXCBConnection(dpy);
+ primaryScreenNumber = DefaultScreen(dpy);
+ connection = XGetXCBConnection(dpy);
XSetEventQueueOwner(dpy, XCBOwnsEventQueue);
XSetErrorHandler(nullErrorHandler);
XSetIOErrorHandler(ioErrorHandler);
- m_xlib_display = dpy;
+ xlibDisplay = dpy;
}
#else
- m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreenNumber);
+ connection = xcb_connect(displayName.constData(), &primaryScreenNumber);
#endif // QT_CONFIG(xcb_xlib)
-
- if (Q_UNLIKELY(!m_connection || xcb_connection_has_error(m_connection))) {
- qCWarning(lcQpaScreen, "QXcbConnection: Could not connect to display %s", m_displayName.constData());
- return;
+ if (Q_UNLIKELY(connection == nullptr)) {
+ qWarning("QXcbConnection: Could not connect to display \"%s\"", displayName.constData());
+ return nullptr;
+ }
+ if (Q_UNLIKELY(xcb_connection_has_error(connection))) {
+#if QT_CONFIG(xcb_xlib)
+ XCloseDisplay(static_cast<Display *>(xlibDisplay));
+#else
+ xcb_disconnect(connection);
+#endif
+ qWarning("QXcbConnection: Errors occurred connecting to display \"%s\"", displayName.constData());
+ return nullptr;
}
+ return new QXcbConnection(connection, primaryScreenNumber, nativeInterface,
+ canGrabServer, defaultVisualId, displayName, xlibDisplay);
+}
+
+QXcbConnection::QXcbConnection(xcb_connection_t *c, int primaryScreenNumber,
+ QXcbNativeInterface *nativeInterface, bool canGrabServer,
+ xcb_visualid_t defaultVisualId, const QByteArray &displayName,
+ void *xlibDisplay)
+ : m_connection(c)
+ , m_canGrabServer(canGrabServer)
+ , m_defaultVisualId(defaultVisualId)
+ , m_primaryScreenNumber(primaryScreenNumber)
+ , m_displayName(displayName)
+ , m_nativeInterface(nativeInterface)
+#if QT_CONFIG(xcb_xlib)
+ , m_xlib_display(xlibDisplay)
+#endif
+{
m_reader = new QXcbEventReader(this);
m_reader->start();
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 596174d234..b0c36e61b0 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -383,9 +383,16 @@ class Q_XCB_EXPORT QXcbConnection : public QObject
{
Q_OBJECT
public:
- QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName = 0);
+ explicit QXcbConnection(xcb_connection_t *c, int primaryScreenNumber,
+ QXcbNativeInterface *nativeInterface, bool canGrabServer,
+ xcb_visualid_t defaultVisualId, const QByteArray &displayName,
+ void *xlibDisplay = nullptr);
+
~QXcbConnection();
+ static QXcbConnection *create(QXcbNativeInterface *nativeInterface, bool canGrabServer,
+ xcb_visualid_t defaultVisualId, const char *displayName = nullptr);
+
QXcbConnection *connection() const { return const_cast<QXcbConnection *>(this); }
bool isConnected() const;
@@ -644,21 +651,21 @@ private:
static bool xi2GetValuatorValueIfSet(const void *event, int valuatorNum, double *value);
#endif
- xcb_connection_t *m_connection = nullptr;
+ xcb_connection_t *const m_connection;
const xcb_setup_t *m_setup = nullptr;
const bool m_canGrabServer;
const xcb_visualid_t m_defaultVisualId;
QList<QXcbVirtualDesktop *> m_virtualDesktops;
QList<QXcbScreen *> m_screens;
- int m_primaryScreenNumber = 0;
+ const int m_primaryScreenNumber;
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];
xcb_timestamp_t m_time = XCB_CURRENT_TIME;
xcb_timestamp_t m_netWmUserTime = XCB_CURRENT_TIME;
- QByteArray m_displayName;
+ const QByteArray m_displayName;
QXcbKeyboard *m_keyboard = nullptr;
#ifndef QT_NO_CLIPBOARD
@@ -671,7 +678,7 @@ private:
QXcbNativeInterface *m_nativeInterface = nullptr;
#if QT_CONFIG(xcb_xlib)
- void *m_xlib_display = nullptr;
+ void *const m_xlib_display;
#endif
QXcbEventReader *m_reader = nullptr;
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index e9b36c48b8..1ac5445035 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -192,25 +192,15 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters, int &argc, char
const int numParameters = parameters.size();
m_connections.reserve(1 + numParameters / 2);
- auto conn = new QXcbConnection(m_nativeInterface.data(), m_canGrab, m_defaultVisualId, displayName);
- if (conn->isConnected())
- m_connections << conn;
- else
- delete conn;
-
- for (int i = 0; i < numParameters - 1; i += 2) {
- qCDebug(lcQpaScreen) << "connecting to additional display: " << parameters.at(i) << parameters.at(i+1);
- QString display = parameters.at(i) + QLatin1Char(':') + parameters.at(i+1);
- conn = new QXcbConnection(m_nativeInterface.data(), m_canGrab, m_defaultVisualId, display.toLatin1().constData());
- if (conn->isConnected())
- m_connections << conn;
- else
- delete conn;
- }
- if (m_connections.isEmpty()) {
- qCritical("Could not connect to any X display.");
- exit(1);
+ if (QXcbConnection *defaultConnection = QXcbConnection::create(m_nativeInterface.data(), m_canGrab, m_defaultVisualId, displayName)) {
+ m_connections.append(defaultConnection);
+ for (int i = 0; i < numParameters - 1; i += 2) {
+ qCDebug(lcQpaScreen) << "connecting to additional display: " << parameters.at(i) << parameters.at(i+1);
+ QString display = parameters.at(i) + QLatin1Char(':') + parameters.at(i+1);
+ if (QXcbConnection *connection = QXcbConnection::create(m_nativeInterface.data(), m_canGrab, m_defaultVisualId, display.toLatin1().constData()))
+ m_connections.append(connection);
+ }
}
m_fontDatabase.reset(new QGenericUnixFontDatabase());
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 69e49cb7f6..a2de22d53d 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -103,6 +103,7 @@ public:
QPlatformTheme *createPlatformTheme(const QString &name) const override;
QVariant styleHint(StyleHint hint) const override;
+ bool hasDefaultConnection() const { return !m_connections.isEmpty(); }
QXcbConnection *defaultConnection() const { return m_connections.first(); }
QByteArray wmClass() const;
diff --git a/src/plugins/platforms/xcb/qxcbmain.cpp b/src/plugins/platforms/xcb/qxcbmain.cpp
index f8cb9a9269..539d033ca9 100644
--- a/src/plugins/platforms/xcb/qxcbmain.cpp
+++ b/src/plugins/platforms/xcb/qxcbmain.cpp
@@ -52,10 +52,16 @@ public:
QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const QStringList& parameters, int &argc, char **argv)
{
- if (!system.compare(QLatin1String("xcb"), Qt::CaseInsensitive))
- return new QXcbIntegration(parameters, argc, argv);
+ if (!system.compare(QLatin1String("xcb"), Qt::CaseInsensitive)) {
+ QXcbIntegration *xcbIntegration = new QXcbIntegration(parameters, argc, argv);
+ if (!xcbIntegration->hasDefaultConnection()) {
+ delete xcbIntegration;
+ return nullptr;
+ }
+ return xcbIntegration;
+ }
- return 0;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 7f685b0338..51d0d2879e 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -146,6 +146,7 @@ endif()
expect_pass(test_interface_link_libraries)
expect_pass(test_moc_macro_target)
+expect_pass(test_add_big_resource)
if (NOT CMAKE_VERSION VERSION_LESS 3.8)
# With earlier CMake versions, this test would simply run moc multiple times and lead to:
diff --git a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt
new file mode 100644
index 0000000000..f928b11278
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(test_add_big_resource)
+
+find_package(Qt5Core REQUIRED)
+
+qt5_wrap_cpp(moc_files myobject.h)
+
+qt5_add_big_resources(rcc_files "test_add_big_resource.qrc" "test_add_big_resource2.qrc")
+
+add_executable(myobject myobject.cpp ${moc_files} ${rcc_files})
+target_link_libraries(myobject ${Qt5Core_LIBRARIES})
diff --git a/tests/auto/cmake/test_add_big_resource/myobject.cpp b/tests/auto/cmake/test_add_big_resource/myobject.cpp
new file mode 100644
index 0000000000..5d320b8592
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/myobject.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "myobject.h"
+
+MyObject::MyObject(QObject *parent)
+ : QObject(parent)
+{
+ emit someSignal();
+}
+
+int main(int argc, char **argv)
+{
+ MyObject myObject;
+ // Compile error if the resource file was not created.
+ Q_INIT_RESOURCE(test_add_big_resource);
+ Q_INIT_RESOURCE(test_add_big_resource2);
+ return 0;
+}
diff --git a/tests/auto/cmake/test_add_big_resource/myobject.h b/tests/auto/cmake/test_add_big_resource/myobject.h
new file mode 100644
index 0000000000..b6fbce32cd
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/myobject.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYOBJECT_H
+#define MYOBJECT_H
+
+#include <QObject>
+
+class MyObject : public QObject
+{
+ Q_OBJECT
+public:
+ MyObject(QObject *parent = 0);
+
+signals:
+ void someSignal();
+};
+
+#endif
diff --git a/tests/auto/cmake/test_add_big_resource/resource_file.txt b/tests/auto/cmake/test_add_big_resource/resource_file.txt
new file mode 100644
index 0000000000..2c604a4f18
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/resource_file.txt
@@ -0,0 +1 @@
+Ken sent me.
diff --git a/tests/auto/cmake/test_add_big_resource/resource_file2.txt b/tests/auto/cmake/test_add_big_resource/resource_file2.txt
new file mode 100644
index 0000000000..2c604a4f18
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/resource_file2.txt
@@ -0,0 +1 @@
+Ken sent me.
diff --git a/tests/auto/cmake/test_add_big_resource/test_add_big_resource.qrc b/tests/auto/cmake/test_add_big_resource/test_add_big_resource.qrc
new file mode 100644
index 0000000000..00a17f541f
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/test_add_big_resource.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>resource_file.txt</file>
+</qresource>
+</RCC>
+
diff --git a/tests/auto/cmake/test_add_big_resource/test_add_big_resource2.qrc b/tests/auto/cmake/test_add_big_resource/test_add_big_resource2.qrc
new file mode 100644
index 0000000000..e21cc5e138
--- /dev/null
+++ b/tests/auto/cmake/test_add_big_resource/test_add_big_resource2.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>resource_file2.txt</file>
+</qresource>
+</RCC>
+