Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/…
…staging/dev
  • Loading branch information
alpqr authored and The Qt Project committed Feb 10, 2015
2 parents 34ea269 + fc35f71 commit 0866680
Show file tree
Hide file tree
Showing 187 changed files with 2,438 additions and 1,029 deletions.
2 changes: 1 addition & 1 deletion LICENSE.LGPLv21
@@ -1,6 +1,6 @@
GNU LESSER GENERAL PUBLIC LICENSE

The Qt Toolkit is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
The Qt Toolkit is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal

You may use, distribute and copy the Qt GUI Toolkit under the terms of
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.LGPLv3
@@ -1,6 +1,6 @@
GNU LESSER GENERAL PUBLIC LICENSE

The Qt Toolkit is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
The Qt Toolkit is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
Contact: http://www.qt-project.org/legal

You may use, distribute and copy the Qt GUI Toolkit under the terms of
Expand Down
2 changes: 1 addition & 1 deletion doc/global/config.qdocconf
Expand Up @@ -3,7 +3,7 @@
dita.metadata.default.author = Qt Project
dita.metadata.default.permissions = all
dita.metadata.default.publisher = Qt Project
dita.metadata.default.copyryear = 2014
dita.metadata.default.copyryear = 2015
dita.metadata.default.copyrholder = Digia Plc
dita.metadata.default.audience = programmer

Expand Down
2 changes: 1 addition & 1 deletion doc/global/html-footer-online.qdocconf
Expand Up @@ -76,7 +76,7 @@ HTML.footer += \
"<div class=\"container clearfix no_discs\">\n" \
" <ul id=\"menu-footer-submenu\" class=\"right clearfix\"><li id=\"menu-item-1795\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1795\"><a title=\"Sign into your account.\" href=\"https://account.qt.io/login\">Sign In</a></li>\n" \
" <li id=\"menu-item-1494\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1494\"><a href=\"http://qt.io/contact-us/\">Contact us</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://www.digia.com\">© 2014 Digia Oyj</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://www.digia.com\">© 2015 Digia Oyj</a></li>\n" \
" </ul>\n" \
"</div>\n" \
"</div>\n" \
Expand Down
2 changes: 1 addition & 1 deletion doc/global/html-footer.qdocconf
Expand Up @@ -8,7 +8,7 @@ HTML.footer = \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2014 Digia Plc and/or its\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2015 Digia Plc and/or its\n" \
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
" their respective owners.<br>" \
" The documentation provided herein is licensed under the terms of the" \
Expand Down
2 changes: 1 addition & 1 deletion doc/global/qt-module-defaults-online.qdocconf
Expand Up @@ -5,7 +5,7 @@
HTML.footer = \
" </div>\n" \
" <p class=\"copy-notice\">\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2014 Digia Plc and/or its\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2015 Digia Plc and/or its\n" \
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
" their respective owners. " \
" The documentation provided herein is licensed under the terms of the" \
Expand Down
3 changes: 3 additions & 0 deletions mkspecs/android-g++/qmake.conf
Expand Up @@ -235,3 +235,6 @@ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
!exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.")

load(qt_config)

QMAKE_DEFAULT_LIBDIRS = $$QMAKE_LIBDIR
QMAKE_DEFAULT_INCDIRS = $$QMAKE_INCDIR
2 changes: 0 additions & 2 deletions mkspecs/features/create_cmake.prf
Expand Up @@ -171,8 +171,6 @@ contains(CONFIG, plugin) {
return()
}

unix:contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true"

CMAKE_MKSPEC = $$[QMAKE_XSPEC]

CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.))
Expand Down
7 changes: 4 additions & 3 deletions mkspecs/features/testcase.prf
Expand Up @@ -21,9 +21,6 @@ debug_and_release:debug_and_release_target {
TEST_TARGET_DIR = $$relative_path($$absolute_path($$DESTDIR, $$OUT_PWD), $$absolute_path($$TESTRUN_CWD, $$OUT_PWD))
}

!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD,^\\./?): \
check.commands = cd $$shell_path($$TESTRUN_CWD) &&

# Allow for a custom test runner script
check.commands += $(TESTRUNNER)

Expand All @@ -46,6 +43,10 @@ check.commands += $(TESTARGS)
# Add environment for non-installed builds
qtAddTargetEnv(check.commands, QT)

# This must happen after adding the environment.
!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \
check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands

# If the test is marked as insignificant, discard the exit code
insignificant_test:check.commands = -$${check.commands}

Expand Down
7 changes: 6 additions & 1 deletion src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
Expand Up @@ -7,7 +7,12 @@ CONFIG += \

load(qt_helper_lib)

DEFINES += HAVE_OT HAVE_ATEXIT HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED
DEFINES += HAVE_OT HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED

# platform/compiler specific definitions
DEFINES += HAVE_ATEXIT
gcc: DEFINES += HAVE_INTEL_ATOMIC_PRIMITIVES
unix: DEFINES += HAVE_PTHREAD HAVE_SCHED_H HAVE_SCHED_YIELD
win32: DEFINES += HB_NO_WIN1256

INCLUDEPATH += $$PWD/include
Expand Down
2 changes: 0 additions & 2 deletions src/corelib/Qt5CoreConfigExtras.cmake.in
Expand Up @@ -66,14 +66,12 @@ list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes})
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes})
set(_qt5_corelib_extra_includes)

!!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS)
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
# macro to add it.
set(Qt5_POSITION_INDEPENDENT_CODE True)
set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\")
!!ENDIF

!!IF !isEmpty(QT_NAMESPACE)
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
Expand Down
4 changes: 2 additions & 2 deletions src/corelib/global/qlibraryinfo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2014 Intel Corporation
** Contact: http://www.qt-project.org/legal
**
Expand Down Expand Up @@ -622,7 +622,7 @@ extern "C" void qt_core_boilerplate();
void qt_core_boilerplate()
{
printf("This is the QtCore library version " QT_BUILD_STR "\n"
"Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\n"
"Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).\n"
"Contact: http://www.qt-project.org/legal\n"
"\n"
"Build date: %s\n"
Expand Down
6 changes: 3 additions & 3 deletions src/corelib/io/qfilesystemengine_unix.cpp
Expand Up @@ -83,13 +83,13 @@ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &e

if (suffix.length() > 0) {
// First step: is the extension known ?
CFStringRef extensionRef = QCFString::toCFStringRef(suffix);
CFStringRef uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);
QCFType<CFStringRef> extensionRef = QCFString::toCFStringRef(suffix);
QCFType<CFStringRef> uniformTypeIdentifier = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, extensionRef, NULL);
if (UTTypeConformsTo(uniformTypeIdentifier, kUTTypeBundle))
return true;

// Second step: check if an application knows the package type
CFStringRef path = QCFString::toCFStringRef(entry.filePath());
QCFType<CFStringRef> path = QCFString::toCFStringRef(entry.filePath());
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path, kCFURLPOSIXPathStyle, true);

UInt32 type, creator;
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/io/qprocess.cpp
Expand Up @@ -1043,9 +1043,9 @@ bool QProcessPrivate::_q_processDied()
return false;
#endif
#ifdef Q_OS_WIN
drainOutputPipes();
if (processFinishedNotifier)
processFinishedNotifier->setEnabled(false);
drainOutputPipes();
#endif

// the process may have died before it got a chance to report that it was
Expand Down
1 change: 1 addition & 0 deletions src/corelib/io/qprocess_win.cpp
Expand Up @@ -785,6 +785,7 @@ bool QProcessPrivate::waitForFinished(int msecs)
void QProcessPrivate::findExitCode()
{
DWORD theExitCode;
Q_ASSERT(pid);
if (GetExitCodeProcess(pid->hProcess, &theExitCode)) {
exitCode = theExitCode;
crashed = (exitCode == 0xf291 // our magic number, see killProcess
Expand Down
5 changes: 4 additions & 1 deletion src/corelib/io/qtemporarydir.cpp
Expand Up @@ -128,8 +128,11 @@ static char *q_mkdtemp(char *templateName)
QFile::ReadOwner |
QFile::WriteOwner |
QFile::ExeOwner, error);
if (error.error() != 0)
if (error.error() != 0) {
if (!QFileSystemEngine::removeDirectory(fileSystemEntry, false))
qWarning() << "Unable to remove unused directory" << templateNameStr;
continue;
}
return templateName;
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/corelib/io/qtextstream.cpp
Expand Up @@ -1574,11 +1574,10 @@ QString QTextStream::readAll()
the stream contains lines longer than this, then the lines will be
split after \a maxlen characters and returned in parts.
If \a maxlen is 0, the lines can be of any length. A common value
for \a maxlen is 75.
If \a maxlen is 0, the lines can be of any length.
The returned line has no trailing end-of-line characters ("\\n"
or "\\r\\n"), so calling QString::trimmed() is unnecessary.
or "\\r\\n"), so calling QString::trimmed() can be unnecessary.
If the stream has read to the end of the file, \l {QTextStream::readLine()}{readLine()}
will return a null QString. For strings, or for devices that support it,
Expand Down
8 changes: 7 additions & 1 deletion src/corelib/io/qurl_mac.mm
Expand Up @@ -54,7 +54,13 @@

CFURLRef QUrl::toCFURL() const
{
return CFURLCreateWithString(0, toString(FullyEncoded).toCFString(), 0);
CFURLRef url = 0;
CFStringRef str = toString(FullyEncoded).toCFString();
if (str) {
url = CFURLCreateWithString(0, str, 0);
CFRelease(str);
}
return url;
}

QUrl QUrl::fromNSURL(const NSURL *url)
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/kernel/qcoreevent.cpp
Expand Up @@ -539,7 +539,7 @@ QTimerEvent::~QTimerEvent()
\a child.
\a type can be QEvent::ChildAdded, QEvent::ChildRemoved,
QEvent::ChildPolished, or QEvent::ChildRemoved.
or QEvent::ChildPolished.
\sa child()
*/
Expand Down
5 changes: 3 additions & 2 deletions src/corelib/kernel/qobject.cpp
Expand Up @@ -3711,13 +3711,14 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
} else if (callFunction && c->method_offset <= receiver->metaObject()->methodOffset()) {
//we compare the vtable to make sure we are not in the destructor of the object.
locker.unlock();
const int methodIndex = c->method();
if (qt_signal_spy_callback_set.slot_begin_callback != 0)
qt_signal_spy_callback_set.slot_begin_callback(receiver, c->method(), argv ? argv : empty_argv);
qt_signal_spy_callback_set.slot_begin_callback(receiver, methodIndex, argv ? argv : empty_argv);

callFunction(receiver, QMetaObject::InvokeMetaMethod, method_relative, argv ? argv : empty_argv);

if (qt_signal_spy_callback_set.slot_end_callback != 0)
qt_signal_spy_callback_set.slot_end_callback(receiver, c->method());
qt_signal_spy_callback_set.slot_end_callback(receiver, methodIndex);
locker.relock();
} else {
const int method = method_relative + c->method_offset;
Expand Down
6 changes: 3 additions & 3 deletions src/corelib/kernel/qtcore_eval.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtCore module of the Qt Toolkit.
Expand Down Expand Up @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE

static const char boilerplate_supported_but_time_limited[] =
"\nQt %1 Evaluation License\n"
"Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n"
"Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).\n"
"This trial version may only be used for evaluation purposes\n"
"and will shut down after 120 minutes.\n"
"Registered to:\n"
Expand All @@ -57,7 +57,7 @@ static const char boilerplate_supported_but_time_limited[] =

static const char boilerplate_supported[] =
"\nQt %1 Evaluation License\n"
"Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).\n"
"Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).\n"
"This trial version may only be used for evaluation purposes\n"
"Registered to:\n"
" Licensee: %2\n\n"
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/tools/qline.cpp
Expand Up @@ -334,7 +334,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line)
or a null line.
The intersect() function determines the IntersectType for this
line and a given line, while the angle() function returns the
line and a given line, while the angleTo() function returns the
angle between the lines. In addition, the unitVector() function
returns a line that has the same starting point as this line, but
with a length of only 1, while the normalVector() function returns
Expand Down
4 changes: 3 additions & 1 deletion src/corelib/tools/qpair.h
Expand Up @@ -56,7 +56,9 @@ struct QPair
{ first = p.first; second = p.second; return *this; }
#ifdef Q_COMPILER_RVALUE_REFS
template <typename TT1, typename TT2>
Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p) : first(std::move(p.first)), second(std::move(p.second)) {}
Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p)
// can't use std::move here as it's not constexpr in C++11:
: first(static_cast<TT1 &&>(p.first)), second(static_cast<TT2 &&>(p.second)) {}
template <typename TT1, typename TT2>
Q_DECL_RELAXED_CONSTEXPR QPair &operator=(QPair<TT1, TT2> &&p)
{ first = std::move(p.first); second = std::move(p.second); return *this; }
Expand Down
2 changes: 2 additions & 0 deletions src/corelib/tools/qsharedpointer_impl.h
Expand Up @@ -412,6 +412,7 @@ template <class T> class QSharedPointer
# ifdef QT_SHAREDPOINTER_TRACK_POINTERS
internalSafetyCheckAdd(result.d, result.value);
# endif
result.enableSharedFromThis(result.data());
return result;
}
#else
Expand All @@ -432,6 +433,7 @@ template <class T> class QSharedPointer
internalSafetyCheckAdd(result.d, result.value);
# endif
result.d->setQObjectShared(result.value, true);
result.enableSharedFromThis(result.data());
return result;
}

Expand Down

0 comments on commit 0866680

Please sign in to comment.