Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

bb10
Frederik Gladhorn 2013-01-16 23:51:11 +01:00 committed by The Qt Project
commit e3a10e15ff
113 changed files with 22253 additions and 1551 deletions

6
configure vendored
View File

@ -2624,6 +2624,11 @@ else
CFG_FRAMEWORK=no
fi
# disable GTK style support auto-detection on Mac
if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then
CFG_QGTKSTYLE=no
fi
QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
TEST_COMPILER=$QMAKE_CONF_COMPILER
@ -2740,6 +2745,7 @@ libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'`
DEFAULT_LIBDIRS=`IFS=:; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done | sort -u`
DEFAULT_INCDIRS=`echo "$gccout" | awk '
/^End of search/ { yup=0 }
/ \(framework directory\)$/ { next }
yup { print substr($0, 2) }
/^\#include </ { yup=1 }
' | sort -u`

5
dist/README vendored
View File

@ -152,8 +152,3 @@ Much more information is available at:
We hope you will enjoy using Qt!
- The Qt developers @ qt-project.org
In memory of Trond Kjernåsen.
You will not be forgotten.

5
dist/changes-5.0.1 vendored
View File

@ -98,6 +98,7 @@ Qt for Windows CE
* Compiler Specific Changes *
****************************************************************************
- MinGW: Statically link runtime libraries into qmake
****************************************************************************
* Tools *
@ -113,3 +114,7 @@ Qt for Windows CE
* Important Behavior Changes *
****************************************************************************
- QSharedMemory on Unix systems now no longer creates shared memory
segments that are readable and writeable to everyone. From Qt 5.0.1
forward, the segments are created readable and writeable only by the
current user. This matches the behavior on Windows.

View File

@ -54,7 +54,7 @@
\snippet rasterwindow/rasterwindow.h 1
We first start by including the the QtGui headers. This means we
We first start by including the QtGui headers. This means we
can use all classes in the Qt GUI module. Classes can also be
included individually if that is preferred.

View File

@ -92,7 +92,8 @@ void HelloWindow::mousePressEvent(QMouseEvent *)
void HelloWindow::render()
{
emit needRender(this, m_color, size());
if (isExposed())
emit needRender(this, m_color, size());
}
void HelloWindow::updateColor()

View File

@ -33,70 +33,70 @@
machine to implement key frame animations.
\image stickman-example.png
In this example, we will write a small application which animates the joints in a skeleton and
projects a stickman figure on top. The stickman can be either "alive" or "dead", and when in the
"alive" state, he can be performing different actions defined by key frame animations.
Animations are implemented as composite states. Each child state of the animation state
represents a frame in the animation by setting the position of each joint in the stickman's
skeleton to the positions defined for the particular frame. The frames are then bound together
"alive" state, he can be performing different actions defined by key frame animations.
Animations are implemented as composite states. Each child state of the animation state
represents a frame in the animation by setting the position of each joint in the stickman's
skeleton to the positions defined for the particular frame. The frames are then bound together
with animated transitions that trigger on the source state's propertiesAssigned() signal. Thus,
the machine will enter the state representing the next frame in the animation immediately after
it has finished animating into the previous frame.
\image stickman-example1.png
The states for an animation is constructed by reading a custom animation file format and
creating states that assign values to the the "position" properties of each of the nodes in the
skeleton graph.
The states for an animation is constructed by reading a custom animation file format and
creating states that assign values to the "position" properties of each of the nodes in the
skeleton graph.
\snippet animation/stickman/lifecycle.cpp 1
The states are then bound together with signal transitions that listen to the
propertiesAssigned() signal.
\snippet animation/stickman/lifecycle.cpp 2
The last frame state is given a transition to the first one, so that the animation will loop
until it is interrupted when a transition out from the animation state is taken. To get smooth
animations between the different key frames, we set a default animation on the state machine.
This is a parallel animation group which contains animations for all the "position" properties
and will be selected by default when taking any transition that leads into a state that assigns
until it is interrupted when a transition out from the animation state is taken. To get smooth
animations between the different key frames, we set a default animation on the state machine.
This is a parallel animation group which contains animations for all the "position" properties
and will be selected by default when taking any transition that leads into a state that assigns
values to these properties.
\snippet animation/stickman/lifecycle.cpp 3
Several such animation states are constructed, and are placed together as children of a top
Several such animation states are constructed, and are placed together as children of a top
level "alive" state which represents the stickman life cycle. Transitions go from the parent
state to the child state to ensure that each of the child states inherit them.
state to the child state to ensure that each of the child states inherit them.
\image stickman-example2.png
This saves us the effort of connect every state to every state with identical transitions. The
state machine makes sure that transitions between the key frame animations are also smooth by
This saves us the effort of connect every state to every state with identical transitions. The
state machine makes sure that transitions between the key frame animations are also smooth by
applying the default animation when interrupting one and starting another.
Finally, there is a transition out from the "alive" state and into the "dead" state. This is
a custom transition type called LightningSrikesTransition which samples every second and
triggers at random (one out of fifty times on average.)
Finally, there is a transition out from the "alive" state and into the "dead" state. This is
a custom transition type called LightningSrikesTransition which samples every second and
triggers at random (one out of fifty times on average.)
\snippet animation/stickman/lifecycle.cpp 4
When it triggers, the machine will first enter a "lightningBlink" state which uses a timer to
pause for a brief period of time while the background color of the scene is white. This gives us
When it triggers, the machine will first enter a "lightningBlink" state which uses a timer to
pause for a brief period of time while the background color of the scene is white. This gives us
a flash effect when the lightning strikes.
\snippet animation/stickman/lifecycle.cpp 5
We start and stop a QTimer object when entering and exiting the state. Then we transition into
the "dead" state when the timer times out.
\snippet animation/stickman/lifecycle.cpp 0
When the machine is in the "dead" state, it will be unresponsive. This is because the "dead"
When the machine is in the "dead" state, it will be unresponsive. This is because the "dead"
state has no transitions leading out.
\image stickman-example3.png
*/

View File

@ -27,9 +27,12 @@ QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
IMX6_CFLAGS = -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS_RELEASE += $$IMX6_CFLAGS
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS
IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX6_CFLAGS_RELEASE = -O2 $$IMX6_CFLAGS
QMAKE_CFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG += $$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG += $$IMX6_CFLAGS
include(../common/linux_device_post.conf)

View File

@ -52,7 +52,7 @@ contains(CMAKE_LIB_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
CMAKE_LIB_DIR_IS_ABSOLUTE = True
}
CMAKE_BIN_DIR = $$[QT_INSTALL_BINS]/
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
CMAKE_BIN_DIR = $$replace(CMAKE_BIN_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
} else {

View File

@ -33,6 +33,7 @@ isEmpty(CMAKE_VERSION) {
} else {
CMAKE_BUILD_TYPE = Debug
CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
win32-g++*:CMAKE_GENERATOR = -G \"MinGW Makefiles\"
BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
@ -42,7 +43,7 @@ isEmpty(CMAKE_VERSION) {
check.commands = \
$(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
cmake $$_PRO_FILE_PWD_ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=\"$$join(CMAKE_PREFIX_PATH, ;)\" && \
cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=\"$$join(CMAKE_PREFIX_PATH, ;)\" && \
$(TESTRUNNER) ctest --output-on-failure
}

View File

@ -51,8 +51,6 @@ QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
QMAKE_INCDIR =
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<

View File

@ -54,7 +54,7 @@ CFLAGS = -c -o$@ -O \
-DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DUNICODE
CXXFLAGS = $(CFLAGS)
LFLAGS = -static-libgcc -s
LFLAGS = -static -s
LIBS = -lole32 -luuid -ladvapi32 -lkernel32
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =

View File

@ -366,16 +366,6 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
}
static QString cQuoted(const QString &str)
{
QString ret = str;
ret.replace(QLatin1Char('"'), QStringLiteral("\\\""));
ret.replace(QLatin1Char('\\'), QStringLiteral("\\\\"));
ret.prepend(QLatin1Char('"'));
ret.append(QLatin1Char('"'));
return ret;
}
void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
{
const ProString templateName = project->first("TEMPLATE");

View File

@ -382,7 +382,7 @@ void Win32MakefileGenerator::processRcFileVar()
if (Option::qmake_mode == Option::QMAKE_GENERATE_NOTHING)
return;
if (((!project->values("VERSION").isEmpty())
if (((!project->values("VERSION").isEmpty() || !project->values("RC_ICONS").isEmpty())
&& project->values("RC_FILE").isEmpty()
&& project->values("RES_FILE").isEmpty()
&& !project->isActiveConfig("no_generated_target_info")
@ -397,6 +397,10 @@ void Win32MakefileGenerator::processRcFileVar()
vers += "0";
QString versionString = vers.join('.');
QStringList rcIcons;
foreach (const ProString &icon, project->values("RC_ICONS"))
rcIcons.append(fileFixify(icon.toQString(), FileFixifyAbsolute));
QString companyName;
if (!project->values("QMAKE_TARGET_COMPANY").isEmpty())
companyName = project->values("QMAKE_TARGET_COMPANY").join(' ');
@ -425,6 +429,11 @@ void Win32MakefileGenerator::processRcFileVar()
ts << "# include <winver.h>" << endl;
ts << "# endif" << endl;
ts << endl;
if (!rcIcons.isEmpty()) {
for (int i = 0; i < rcIcons.size(); ++i)
ts << QString("IDI_ICON%1\tICON\tDISCARDABLE\t%2").arg(i + 1).arg(cQuoted(rcIcons[i])) << endl;
ts << endl;
}
ts << "VS_VERSION_INFO VERSIONINFO" << endl;
ts << "\tFILEVERSION " << QString(versionString).replace(".", ",") << endl;
ts << "\tPRODUCTVERSION " << QString(versionString).replace(".", ",") << endl;
@ -902,4 +911,14 @@ QString Win32MakefileGenerator::escapeFilePath(const QString &path) const
return ret;
}
QString Win32MakefileGenerator::cQuoted(const QString &str)
{
QString ret = str;
ret.replace(QLatin1Char('"'), QStringLiteral("\\\""));
ret.replace(QLatin1Char('\\'), QStringLiteral("\\\\"));
ret.prepend(QLatin1Char('"'));
ret.append(QLatin1Char('"'));
return ret;
}
QT_END_NAMESPACE

View File

@ -73,6 +73,7 @@ protected:
void fixTargetExt();
void processRcFileVar();
virtual QString getLibTarget();
static QString cQuoted(const QString &str);
};
inline Win32MakefileGenerator::~Win32MakefileGenerator()

View File

@ -98,7 +98,7 @@ QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5), con
return (new StoredFunctorCall5<T, T (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(functionPointer, arg1, arg2, arg3, arg4, arg5))->start();
}
#ifdef Q_COMPILER_DECLTYPE
#if defined(Q_COMPILER_DECLTYPE) && defined(Q_COMPILER_AUTO_FUNCTION)
template <typename Functor>
auto run(Functor functor) -> typename QtPrivate::QEnableIf<!QtPrivate::HasResultType<Functor>::Value, QFuture<decltype(functor())> >::Type

View File

@ -50,7 +50,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist
contains(DEFINES,QT_EVAL):include(eval.pri)
HOST_BINS = $$[QT_HOST_BINS]
HOST_BINS = $$[QT_HOST_BINS/raw]
host_bins.name = host_bins
host_bins.variable = HOST_BINS

View File

@ -83,7 +83,7 @@
existing signal in that class that is emitted whenever the value
of the property changes.
\li A \c REVISION number is optional. If included, it defines the
\li A \c REVISION number is optional. If included, it defines
the property and its notifier signal to be used in a particular
revision of the API that is exposed to QML.

View File

@ -94,8 +94,8 @@
# define Q_FUNC_INFO __FUNCSIG__
# define Q_ALIGNOF(type) __alignof(type)
# define Q_DECL_ALIGN(n) __declspec(align(n))
# define Q_ASSUME(expr) __assume(expr)
# define Q_UNREACHABLE() __assume(0)
# define Q_ASSUME_IMPL(expr) __assume(expr)
# define Q_UNREACHABLE_IMPL() __assume(0)
# define Q_NORETURN __declspec(noreturn)
# define Q_DECL_DEPRECATED __declspec(deprecated)
# define Q_DECL_EXPORT __declspec(dllexport)
@ -150,18 +150,18 @@
# if defined(__INTEL_COMPILER)
/* Intel C++ also masquerades as GCC */
# define Q_CC_INTEL
# define Q_ASSUME(expr) __assume(expr)
# define Q_UNREACHABLE() __assume(0)
# define Q_ASSUME_IMPL(expr) __assume(expr)
# define Q_UNREACHABLE_IMPL() __assume(0)
# elif defined(__clang__)
/* Clang also masquerades as GCC */
# define Q_CC_CLANG
# define Q_ASSUME(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE() __builtin_unreachable()
# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# else
/* Plain GCC */
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
# define Q_ASSUME(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE() __builtin_unreachable()
# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
# endif
# endif
@ -789,11 +789,11 @@
#ifndef Q_UNLIKELY
# define Q_UNLIKELY(x) (x)
#endif
#ifndef Q_ASSUME
# define Q_ASSUME(expr) qt_noop()
#ifndef Q_ASSUME_IMPL
# define Q_ASSUME_IMPL(expr) qt_noop()
#endif
#ifndef Q_UNREACHABLE
# define Q_UNREACHABLE() qt_noop()
#ifndef Q_UNREACHABLE_IMPL
# define Q_UNREACHABLE_IMPL() qt_noop()
#endif
#ifndef Q_ALLOC_SIZE
# define Q_ALLOC_SIZE(x)
@ -851,4 +851,17 @@
#define qMove(x) (x)
#endif
#define Q_UNREACHABLE() \
do {\
Q_ASSERT_X(false, "Q_UNREACHABLE()", "Q_UNREACHABLE was reached");\
Q_UNREACHABLE_IMPL();\
} while (0)
#define Q_ASSUME(Expr) \
do {\
const bool valueOfExpression = Expr;\
Q_ASSERT_X(valueOfExpression, "Q_ASSUME()", "Assumption in Q_ASSUME(\"" #Expr "\") was not correct");\
Q_ASSUME_IMPL(valueOfExpression);\
} while (0)
#endif // QCOMPILERDETECTION_H

View File

@ -1829,6 +1829,8 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
that the current code execution cannot be reached. That is, Q_ASSUME(false)
is equivalent to Q_UNREACHABLE().
In debug builds the condition is enforced by an assert to facilitate debugging.
\note Q_LIKELY() tells the compiler that the expression is likely, but not
the only possibility. Q_ASSUME tells the compiler that it is the only
possibility.
@ -1863,6 +1865,8 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
By using this macro in impossible conditions, code coverage may be improved
as dead code paths may be eliminated.
In debug builds the condition is enforced by an assert to facilitate debugging.
\sa Q_ASSERT(), Q_ASSUME(), qFatal()
*/

View File

@ -2341,7 +2341,7 @@
\enum Qt::InputMethodQuery
\value ImEnabled The widget accepts input method input.
\value ImMicroFocus \obsolete replaced by \c ImCursorRectangle
\value ImMicroFocus This query is obsolete. Use \c ImCursorRectangle instead.
\value ImCursorRectangle The rectangle covering the area of the input cursor in widget coordinates.
\value ImFont The currently used font for text input.
\value ImCursorPosition The logical position of the cursor within the text surrounding the input area

View File

@ -2005,8 +2005,8 @@ bool QDir::match(const QString &filter, const QString &fileName)
#endif // QT_NO_REGEXP
/*!
Removes all multiple directory separators "/" and resolves any
"."s or ".."s found in the path, \a path.
Returns \a path with directory separators normalized (converted to "/") and
redundant ones removed, and "."s and ".."s resolved (as far as possible).
Symbolic links are kept. This function does not return the
canonical path, but rather the simplest version of the input.

View File

@ -48,6 +48,7 @@
#include "qfileinfo.h"
#include "private/qiodevice_p.h"
#include "private/qfile_p.h"
#include "private/qfilesystemengine_p.h"
#include "private/qsystemerror_p.h"
#if defined(QT_BUILD_CORE_LIB)
# include "qcoreapplication.h"
@ -548,7 +549,19 @@ QFile::rename(const QString &newName)
qWarning("QFile::rename: Empty or null file name");
return false;
}
if (QFile(newName).exists()) {
if (d->fileName == newName) {
d->setError(QFile::RenameError, tr("Destination file is the same file."));
return false;
}
if (!exists()) {
d->setError(QFile::RenameError, tr("Source file does not exist."));
return false;
}
// If the file exists and it is a case-changing rename ("foo" -> "Foo"),
// compare Ids to make sure it really is a different file.
if (QFile::exists(newName)
&& (d->fileName.compare(newName, Qt::CaseInsensitive)
|| QFileSystemEngine::id(QFileSystemEntry(d->fileName)) != QFileSystemEngine::id(QFileSystemEntry(newName)))) {
// ### Race condition. If a file is moved in after this, it /will/ be
// overwritten. On Unix, the proper solution is to use hardlinks:
// return ::link(old, new) && ::remove(old);

View File

@ -75,6 +75,7 @@ public:
static QFileSystemEntry getLinkTarget(const QFileSystemEntry &link, QFileSystemMetaData &data);
static QFileSystemEntry canonicalName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
static QFileSystemEntry absoluteName(const QFileSystemEntry &entry);
static QByteArray id(const QFileSystemEntry &entry);
static QString resolveUserName(const QFileSystemEntry &entry, QFileSystemMetaData &data);
static QString resolveGroupName(const QFileSystemEntry &entry, QFileSystemMetaData &data);

View File

@ -46,6 +46,8 @@
#include <QtCore/qvarlengtharray.h>
#include <stdlib.h> // for realpath()
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
@ -174,9 +176,16 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
#else
char *ret = 0;
# if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
// Mac OS X 10.5.x doesn't support the realpath(X,0) extension we use here.
// When using -mmacosx-version-min=10.4, we get the legacy realpath implementation,
// which does not work properly with the realpath(X,0) form. See QTBUG-28282.
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) {
ret = realpath(entry.nativeFilePath().constData(), (char*)0);
ret = (char*)malloc(PATH_MAX + 1);
if (ret && realpath(entry.nativeFilePath().constData(), (char*)ret) == 0) {
const int savedErrno = errno; // errno is checked below, and free() might change it
free(ret);
errno = savedErrno;
ret = 0;
}
} else {
// on 10.5 we can use FSRef to resolve the file path.
QString path = QDir::cleanPath(entry.filePath());
@ -251,6 +260,20 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
return QFileSystemEntry(stringVersion);
}
//static
QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
{
struct stat statResult;
if (stat(entry.nativeFilePath().constData(), &statResult)) {
qErrnoWarning("stat() failed for '%s'", entry.nativeFilePath().constData());
return QByteArray();
}
QByteArray result = QByteArray::number(quint64(statResult.st_dev), 16);
result += ':';
result += QByteArray::number(quint64(statResult.st_ino), 16);
return result;
}
//static
QString QFileSystemEngine::resolveUserName(uint userId)
{

View File

@ -42,6 +42,7 @@
#include "qfilesystemengine_p.h"
#include "qplatformdefs.h"
#include "qsysinfo.h"
#include "private/qabstractfileengine_p.h"
#include "private/qfsfileengine_p.h"
#include <private/qsystemlibrary_p.h>
@ -563,6 +564,80 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
}
#ifndef Q_OS_WINCE
// FILE_INFO_BY_HANDLE_CLASS has been extended by FileIdInfo = 18 as of VS2012.
typedef enum { Q_FileIdInfo = 18 } Q_FILE_INFO_BY_HANDLE_CLASS;
# if defined(Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700)
typedef struct _FILE_ID_128 {
BYTE Identifier[16];
} FILE_ID_128, *PFILE_ID_128;
typedef struct _FILE_ID_INFO {
ULONGLONG VolumeSerialNumber;
FILE_ID_128 FileId;
} FILE_ID_INFO, *PFILE_ID_INFO;
# endif // if defined (Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700))
// File ID for Windows up to version 7.
static inline QByteArray fileId(HANDLE handle)
{
QByteArray result;
BY_HANDLE_FILE_INFORMATION info;
if (GetFileInformationByHandle(handle, &info)) {
result = QByteArray::number(uint(info.nFileIndexLow), 16);
result += ':';
result += QByteArray::number(uint(info.nFileIndexHigh), 16);
}
return result;
}
// File ID for Windows starting from version 8.
QByteArray fileIdWin8(HANDLE handle)
{
typedef BOOL (WINAPI* GetFileInformationByHandleExType)(HANDLE, Q_FILE_INFO_BY_HANDLE_CLASS, void *, DWORD);
// Dynamically resolve GetFileInformationByHandleEx (Vista onwards).
static GetFileInformationByHandleExType getFileInformationByHandleEx = 0;
if (!getFileInformationByHandleEx) {
QSystemLibrary library(QLatin1String("kernel32"));
getFileInformationByHandleEx = (GetFileInformationByHandleExType)library.resolve("GetFileInformationByHandleEx");
}
QByteArray result;
if (getFileInformationByHandleEx) {
FILE_ID_INFO infoEx;
if (getFileInformationByHandleEx(handle, Q_FileIdInfo,
&infoEx, sizeof(FILE_ID_INFO))) {
result = QByteArray::number(infoEx.VolumeSerialNumber, 16);
result += ':';
result += QByteArray((char *)infoEx.FileId.Identifier, sizeof(infoEx.FileId.Identifier)).toHex();
}
}
return result;
}
#endif // !Q_OS_WINCE
//static
QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
{
#ifndef Q_OS_WINCE
QByteArray result;
const HANDLE handle =
CreateFile((wchar_t*)entry.nativeFilePath().utf16(), GENERIC_READ,
FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle) {
result = QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS8 ?
fileIdWin8(handle) : fileId(handle);
CloseHandle(handle);
}
return result;
#else // !Q_OS_WINCE
return entry.nativeFilePath().toLower().toLatin1();
#endif
}
//static
QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own)
{

View File

@ -646,11 +646,26 @@ int QMetaType::registerNormalizedType(const NS(QByteArray) &normalizedTypeName,
"size %i, now registering size %i.",
normalizedTypeName.constData(), idx, previousSize, size);
}
// Ignore WasDeclaredAsMetaType inconsitency, to many users were hitting the problem
previousFlags |= WasDeclaredAsMetaType;
flags |= WasDeclaredAsMetaType;
if (previousFlags != flags) {
qFatal("QMetaType::registerType: Binary compatibility break "
"-- Type flags for type '%s' [%i] don't match. Previously "
"registered TypeFlags(0x%x), now registering TypeFlags(0x%x).",
normalizedTypeName.constData(), idx, previousFlags, int(flags));
const int maskForTypeInfo = NeedsConstruction | NeedsDestruction | MovableType;
const char *msg = "QMetaType::registerType: Binary compatibility break. "
"\nType flags for type '%s' [%i] don't match. Previously "
"registered TypeFlags(0x%x), now registering TypeFlags(0x%x). "
"This is an ODR break, which means that your application depends on a C++ undefined behavior."
"\nHint: %s";
QT_PREPEND_NAMESPACE(QByteArray) hint;
if ((previousFlags & maskForTypeInfo) != (flags & maskForTypeInfo)) {
hint += "\nIt seems that the type was registered at least twice in a different translation units, "
"but Q_DECLARE_TYPEINFO is not visible from all the translations unit or different flags were used."
"Remember that Q_DECLARE_TYPEINFO should be declared before QMetaType registration, "
"preferably it should be placed just after the type declaration and before Q_DECLARE_METATYPE";
}
qFatal(msg, normalizedTypeName.constData(), idx, previousFlags, int(flags), hint.constData());
}
return idx;
@ -1722,6 +1737,9 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
\snippet code/src_corelib_kernel_qmetatype.cpp 9
\warning This function is useful only for registering an alias (typedef)
for every other use case Q_DECLARE_METATYPE and qMetaTypeId() should be used instead.
\sa qRegisterMetaTypeStreamOperators(), QMetaType::isRegistered(),
Q_DECLARE_METATYPE()
*/
@ -1767,7 +1785,7 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
*/
/*!
\fn int qRegisterMetaType(const char *typeName)
\fn int qRegisterMetaType()
\relates QMetaType
\threadsafe
\since 4.2
@ -1779,6 +1797,14 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
\snippet code/src_corelib_kernel_qmetatype.cpp 7
This function requires that \c{T} is a fully defined type at the point
where the function is called. For pointer types, it also requires that the
pointed to type is fully defined. Use Q_DECLARE_OPAQUE_POINTER() to be able
to register pointers to forward declared types.
After a type has been registered, you can create and destroy
objects of that type dynamically at run-time.
To use the type \c T in QVariant, using Q_DECLARE_METATYPE() is
sufficient. To use the type \c T in queued signal and slot connections,
\c{qRegisterMetaType<T>()} must be called before the first connection

View File

@ -197,7 +197,7 @@ bool QSharedMemoryPrivate::create(int size)
}
// create
if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) {
if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) {
QString function = QLatin1String("QSharedMemory::create");
switch (errno) {
case EINVAL:
@ -218,7 +218,7 @@ bool QSharedMemoryPrivate::create(int size)
bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
{
// grab the shared memory segment id
int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660));
int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600));
if (-1 == id) {
setErrorString(QLatin1String("QSharedMemory::attach (shmget)"));
return false;
@ -263,7 +263,7 @@ bool QSharedMemoryPrivate::detach()
size = 0;
// Get the number of current attachments
int id = shmget(unix_key, 0, 0444);
int id = shmget(unix_key, 0, 0400);
cleanHandle();
struct shmid_ds shmid_ds;

View File

@ -136,10 +136,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode)
}
// Get semaphore
semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL);
semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL);
if (-1 == semaphore) {
if (errno == EEXIST)
semaphore = semget(unix_key, 1, 0666 | IPC_CREAT);
semaphore = semget(unix_key, 1, 0600 | IPC_CREAT);
if (-1 == semaphore) {
setErrorString(QLatin1String("QSystemSemaphore::handle"));
cleanHandle();

View File

@ -380,10 +380,13 @@ class QQNXLocaleData: public QObject
public:
QQNXLocaleData();
virtual ~QQNXLocaleData();
void readPPSLocale();
public Q_SLOTS:
void updateMeasurementSystem();
void installSocketNotifier();
private:
void initialize();
public:
uint ppsMeasurement;

View File

@ -66,7 +66,12 @@ QQNXLocaleData::QQNXLocaleData()
:ppsNotifier(0)
,ppsFd(-1)
{
readPPSLocale();
initialize();
// we cannot call this directly, because by the time this constructor is
// called, the event dispatcher has not yet been created, causing the
// subsequent call to QSocketNotifier constructor to fail.
QMetaObject::invokeMethod(this, "installSocketNotifier", Qt::QueuedConnection);
}
QQNXLocaleData::~QQNXLocaleData()
@ -106,7 +111,7 @@ void QQNXLocaleData::updateMeasurementSystem()
ppsMeasurement = QLocale::MetricSystem;
}
void QQNXLocaleData::readPPSLocale()
void QQNXLocaleData::initialize()
{
errno = 0;
ppsFd = qt_safe_open(ppsServicePath, O_RDONLY);
@ -116,10 +121,22 @@ void QQNXLocaleData::readPPSLocale()
}
updateMeasurementSystem();
if (QCoreApplication::instance()) {
ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
}
void QQNXLocaleData::installSocketNotifier()
{
if (!QCoreApplication::instance() || ppsFd == -1) {
qWarning("QQNXLocaleData: Failed to create socket notifier, locale updates may not work.");
return;
}
if (ppsNotifier) {
qWarning("QQNXLocaleData: socket notifier already created.");
return;
}
ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
}
#endif

View File

@ -759,15 +759,26 @@ void QOpenGLContextGroupPrivate::removeContext(QOpenGLContext *ctx)
{
Q_Q(QOpenGLContextGroup);
QMutexLocker locker(&m_mutex);
m_shares.removeOne(ctx);
bool deleteObject = false;
if (ctx == m_context && !m_shares.isEmpty())
m_context = m_shares.first();
{
QMutexLocker locker(&m_mutex);
m_shares.removeOne(ctx);
if (!m_refs.deref()) {
cleanup();
q->deleteLater();
if (ctx == m_context && !m_shares.isEmpty())
m_context = m_shares.first();
if (!m_refs.deref()) {
cleanup();
deleteObject = true;
}
}
if (deleteObject) {
if (q->thread() == QThread::currentThread())
delete q; // Delete directly to prevent leak, refer to QTBUG-29056
else
q->deleteLater();
}
}

View File

@ -877,7 +877,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
// Tag it for later so that if the same path is drawn twice, it is assumed to be static and thus cachable
path.makeCacheable();
if (device->context()->format().stencilBufferSize() == 0) {
if (device->context()->format().stencilBufferSize() <= 0) {
// If there is no stencil buffer, triangulate the path instead.
QRectF bbox = path.controlPointRect();

View File

@ -305,6 +305,8 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
case QFontEngineGlyphCache::Raster_RGBMask:
m_image = QImage(width, height, QImage::Format_RGB32);
break;
case QFontEngineGlyphCache::Raster_ARGB:
break;
}
}

View File

@ -69,7 +69,8 @@ public:
enum Type {
Raster_RGBMask,
Raster_A8,
Raster_Mono
Raster_Mono,
Raster_ARGB
};
QFontEngineGlyphCache(const QTransform &matrix, Type type) : m_transform(matrix), m_type(type) { }

View File

@ -61,6 +61,12 @@
QT_BEGIN_NAMESPACE
//Some distributions of mingw (including 4.7.2 from mingw.org) are missing this from headers.
//Also microsoft headers don't include it when building on XP and earlier.
#ifndef IPV6_V6ONLY
#define IPV6_V6ONLY 27
#endif
#if defined(QNATIVESOCKETENGINE_DEBUG)
void verboseWSErrorDebug(int r)
@ -204,7 +210,6 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt
void QNativeSocketEnginePrivate::setPortAndAddress(sockaddr_in * sockAddrIPv4, qt_sockaddr_in6 * sockAddrIPv6,
quint16 port, const QHostAddress & address, sockaddr ** sockAddrPtr, QT_SOCKLEN_T *sockAddrSize)
{
if (address.protocol() == QAbstractSocket::IPv6Protocol
|| address.protocol() == QAbstractSocket::AnyIPProtocol
|| socketProtocol == QAbstractSocket::IPv6Protocol
@ -599,7 +604,6 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
}
}
#if defined (IPV6_V6ONLY)
// determine if local address is dual mode
DWORD ipv6only = 0;
QT_SOCKOPTLEN_T optlen = sizeof(ipv6only);
@ -611,7 +615,6 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
localAddress = QHostAddress::Any;
}
}
#endif
memset(&sa, 0, sizeof(sa));
if (::getpeername(socketDescriptor, &sa.a, &sockAddrSize) == 0) {
@ -652,7 +655,6 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin
setPortAndAddress(&sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize);
#if defined (IPV6_V6ONLY)
if (socketProtocol == QAbstractSocket::IPv6Protocol && address.toIPv4Address()) {
//IPV6_V6ONLY option must be cleared to connect to a V4 mapped address
if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) {
@ -660,7 +662,6 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin
ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
}
}
#endif
forever {
int connectResult = ::WSAConnect(socketDescriptor, sockAddrPtr, sockAddrSize, 0,0,0,0);
@ -793,15 +794,11 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port)
// binding to a multicast address
address = QHostAddress(QHostAddress::AnyIPv6);
}
#if defined (IPV6_V6ONLY)
//This is default in current windows versions, it may change in future so set it explicitly
if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) {
ipv6only = 1;
ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
}
#else
Q_UNUSED(ipv6only)
#endif
break;
case QAbstractSocket::IPv4Protocol:
if ((address.toIPv4Address() & 0xffff0000) == 0xefff0000) {
@ -810,12 +807,9 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port)
}
break;
case QAbstractSocket::AnyIPProtocol:
#if defined (IPV6_V6ONLY)
if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0)
if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) {
ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
else
#endif
{
} else {
address = QHostAddress(QHostAddress::AnyIPv4); //xp/WS2003 and earlier don't support dual stack, so bind to IPv4
socketProtocol = QAbstractSocket::IPv4Protocol;
}

View File

@ -43,6 +43,10 @@
#ifndef QSSLCERTIFICATE_H
#define QSSLCERTIFICATE_H
#ifdef verify
#undef verify
#endif
#include <QtCore/qnamespace.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qcryptographichash.h>

View File

@ -2389,7 +2389,7 @@ QList<QByteArray> QSslSocketPrivate::unixRootCertDirectories()
<< "/usr/local/ssl/" // Normal OpenSSL Tarball
<< "/var/ssl/certs/" // AIX
<< "/usr/local/ssl/certs/" // Solaris
<< "/var/certmgr/web/user_trusted/" // BlackBerry
<< "/etc/openssl/certs/" // BlackBerry
<< "/opt/openssl/certs/"; // HP-UX
}

View File

@ -149,8 +149,6 @@ void QCoreTextFontEngine::init()
Q_ASSERT(ctfont != NULL);
Q_ASSERT(cgFont != NULL);
glyphFormat = defaultGlyphFormat;
QCFString family = CTFontCopyFamilyName(ctfont);
fontDef.family = family;
@ -159,6 +157,14 @@ void QCoreTextFontEngine::init()
synthesisFlags = 0;
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(ctfont);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if (supportsColorGlyphs() && (traits & kCTFontColorGlyphsTrait))
glyphFormat = QFontEngineGlyphCache::Raster_ARGB;
else
#endif
glyphFormat = defaultGlyphFormat;
if (traits & kCTFontItalicTrait)
fontDef.style = QFont::StyleItalic;
@ -422,6 +428,9 @@ static void convertCGPathToQPainterPath(void *info, const CGPathElement *element
void QCoreTextFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nGlyphs,
QPainterPath *path, QTextItem::RenderFlags)
{
if (glyphFormat == QFontEngineGlyphCache::Raster_ARGB)
return; // We can't convert color-glyphs to path
CGAffineTransform cgMatrix = CGAffineTransformIdentity;
cgMatrix = CGAffineTransformScale(cgMatrix, 1, -1);

View File

@ -109,6 +109,21 @@ public:
virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
virtual int glyphMargin(QFontEngineGlyphCache::Type type) { Q_UNUSED(type); return 0; }
static bool supportsColorGlyphs()
{
#if defined(Q_OS_IOS)
return true;
#elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
return &CTFontDrawGlyphs;
#else
return true;
#endif
#else
return false;
#endif
}
static int antialiasingThreshold;
static QFontEngineGlyphCache::Type defaultGlyphFormat;

View File

@ -575,7 +575,7 @@ int QAccessibleTree::childCount() const
QAccessibleInterface *QAccessibleTree::child(int index) const
{
if ((index < 0) || (!view()->model()))
if (index < 0 || !view()->model() || !view()->model()->columnCount())
return 0;
int hHeader = horizontalHeader() ? 1 : 0;

View File

@ -71,7 +71,8 @@ void QCococaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
case QAccessible::TextInserted :
case QAccessible::TextRemoved :
case QAccessible::TextUpdated : {
QCocoaAccessibleElement *element = [QCocoaAccessibleElement elementWithInterface : interface parent : nil];
QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithInterface : interface parent : nil];
[element autorelease];
NSAccessibilityPostNotification(element, NSAccessibilityValueChangedNotification);
break; }

View File

@ -56,7 +56,7 @@
}
- (id)initWithInterface:(void *)anQAccessibleInterface parent:(id)aParent;
+ (QCocoaAccessibleElement *)elementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent;
+ (QCocoaAccessibleElement *)createElementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent;
@end

View File

@ -68,9 +68,9 @@ static QAccessibleInterface *acast(void *ptr)
return self;
}
+ (QCocoaAccessibleElement *)elementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent
+ (QCocoaAccessibleElement *)createElementWithInterface:(void *)anQAccessibleInterface parent:(id)aParent
{
return [[[self alloc] initWithInterface:anQAccessibleInterface parent:aParent] autorelease];
return [[self alloc] initWithInterface:anQAccessibleInterface parent:aParent];
}
- (void)dealloc {
@ -136,7 +136,9 @@ static QAccessibleInterface *acast(void *ptr)
NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids];
for (int i = 0; i < numKids; ++i) {
QAccessibleInterface *childInterface = acast(accessibleInterface)->child(i);
[kids addObject:[QCocoaAccessibleElement elementWithInterface:(void*)childInterface parent:self]];
QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithInterface:(void*)childInterface parent:self];
[kids addObject: element];
[element release];
}
return kids;
@ -251,7 +253,9 @@ static QAccessibleInterface *acast(void *ptr)
}
// hit a child, forward to child accessible interface.
QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithInterface:childInterface parent:self];
QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement createElementWithInterface:childInterface parent:self];
[accessibleElement autorelease];
return [accessibleElement accessibilityHitTest:point];
}

View File

@ -77,7 +77,9 @@
int numKids = m_accessibleRoot->childCount();
NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids];
for (int i = 0; i < numKids; ++i) {
[kids addObject:[QCocoaAccessibleElement elementWithInterface: m_accessibleRoot->child(i) parent:self ]];
QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithInterface: m_accessibleRoot->child(i) parent:self ];
[kids addObject: element];
[element release];
}
return kids;
@ -98,7 +100,8 @@
// Hit a child, forward to child accessible interface.
QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement elementWithInterface: childInterface parent:self ];
QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement createElementWithInterface: childInterface parent:self ];
[accessibleElement autorelease];
return [accessibleElement accessibilityHitTest:point];
}

View File

@ -264,7 +264,7 @@ static int openTtyDevice(const QString &device)
static bool switchToGraphicsMode(int ttyfd, int *oldMode)
{
ioctl(ttyfd, KDGETMODE, &oldMode);
ioctl(ttyfd, KDGETMODE, oldMode);
if (*oldMode != KD_GRAPHICS) {
if (ioctl(ttyfd, KDSETMODE, KD_GRAPHICS) != 0)
return false;

View File

@ -271,8 +271,14 @@ void QQnxWindow::setVisible(bool visible)
window()->requestActivate();
if (window()->isTopLevel() && visible)
QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
if (window()->isTopLevel()) {
if (visible) {
QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
} else {
// Flush the context, otherwise it won't disappear immediately
screen_flush_context(m_screenContext, 0);
}
}
}
void QQnxWindow::updateVisibility(bool parentVisible)

View File

@ -45,6 +45,7 @@
#include "qwindowscontext.h"
#include <QtGui/QWindow>
#include <QtGui/QPainter>
#include <QtCore/QDebug>
@ -147,8 +148,10 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion &region)
nsp << " from: " << m_image->image().size();
}
#endif
m_image.reset(new QWindowsNativeImage(size.width(), size.height(),
QWindowsNativeImage::systemFormat()));
QImage::Format format = QWindowsNativeImage::systemFormat();
if (format == QImage::Format_RGB32 && rasterWindow()->window()->format().hasAlpha())
format = QImage::Format_ARGB32;
m_image.reset(new QWindowsNativeImage(size.width(), size.height(), format));
}
}
@ -168,9 +171,16 @@ bool QWindowsBackingStore::scroll(const QRegion &area, int dx, int dy)
void QWindowsBackingStore::beginPaint(const QRegion &region)
{
Q_UNUSED(region);
if (QWindowsContext::verboseBackingStore > 1)
qDebug() << __FUNCTION__;
if (m_image->image().hasAlphaChannel()) {
QPainter p(&m_image->image());
p.setCompositionMode(QPainter::CompositionMode_Source);
const QColor blank = Qt::transparent;
foreach (const QRect &r, region.rects())
p.fillRect(r, blank);
}
}
QWindowsWindow *QWindowsBackingStore::rasterWindow() const

View File

@ -267,7 +267,7 @@ static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, qreal level)
struct WindowCreationData
{
typedef QWindowsWindow::WindowData WindowData;
enum Flags { ForceChild = 0x1 };
enum Flags { ForceChild = 0x1, ForceTopLevel = 0x2 };
WindowCreationData() : parentHandle(0), type(Qt::Widget), style(0), exStyle(0),
topLevel(false), popup(false), dialog(false), desktop(false),
@ -319,7 +319,13 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
parentHandle = (HWND)prop.value<WId>();
}
topLevel = ((creationFlags & ForceChild) || embedded) ? false : w->isTopLevel();
if (creationFlags & ForceChild) {
topLevel = false;
} else if (creationFlags & ForceTopLevel) {
topLevel = true;
} else {
topLevel = w->isTopLevel();
}
if (topLevel && flags == 1) {
flags |= Qt::WindowTitleHint|Qt::WindowSystemMenuHint|Qt::WindowMinimizeButtonHint
@ -1022,10 +1028,9 @@ void QWindowsWindow::setParent_sys(const QPlatformWindow *parent) const
// WS_CHILD/WS_POPUP must be manually set/cleared in addition
// to dialog frames, etc (see SetParent() ) if the top level state changes.
if (wasTopLevel != isTopLevel) {
const unsigned flags = isTopLevel ? unsigned(0) : unsigned(WindowCreationData::ForceChild);
setWindowFlags_sys(window()->flags(), flags);
}
// Force toplevel state as QWindow::isTopLevel cannot be relied upon here.
if (wasTopLevel != isTopLevel)
setWindowFlags_sys(window()->flags(), unsigned(isTopLevel ? WindowCreationData::ForceTopLevel : WindowCreationData::ForceChild));
}
}

View File

@ -158,6 +158,7 @@ public:
virtual void setVisible(bool visible);
bool isVisible() const;
virtual bool isExposed() const { return m_windowState != Qt::WindowMinimized && isVisible(); }
virtual bool isActive() const;
virtual bool isEmbedded(const QPlatformWindow *parentWindow) const;
virtual QPoint mapToGlobal(const QPoint &pos) const;

View File

@ -107,7 +107,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI
if (!segmentSize)
return;
int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0777);
int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0600);
if (id == -1)
qWarning("QXcbShmImage: shmget() failed (%d) for size %d (%dx%d)",
errno, segmentSize, size.width(), size.height());
@ -272,7 +272,6 @@ void QXcbBackingStore::beginPaint(const QRegion &region)
m_image->preparePaint(region);
#if 0
if (m_image->image()->hasAlphaChannel()) {
QPainter p(m_image->image());
p.setCompositionMode(QPainter::CompositionMode_Source);
@ -282,7 +281,6 @@ void QXcbBackingStore::beginPaint(const QRegion &region)
p.fillRect(*it, blank);
}
}
#endif
}
void QXcbBackingStore::endPaint(const QRegion &)

View File

@ -382,6 +382,11 @@ void QXcbWindow::create()
if (window()->flags() & Qt::WindowTransparentForInput)
setTransparentForMouseEvents(true);
#ifdef XCB_USE_XLIB
// force sync to read outstanding requests - see QTBUG-29106
XSync(DISPLAY_FROM_XCB(m_screen), false);
#endif
#ifndef QT_NO_DRAGANDDROP
connection()->drag()->dndEnable(this, true);
#endif

View File

@ -54,6 +54,12 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QDB2Driver;
class QDB2DriverPrivate;
class QDB2ResultPrivate;

View File

@ -50,6 +50,12 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QIBaseDriverPrivate;
class QIBaseResultPrivate;
class QIBaseDriver;

View File

@ -61,6 +61,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QMYSQLDriverPrivate;
class QMYSQLResultPrivate;
class QMYSQLDriver;

View File

@ -59,6 +59,11 @@ typedef struct OCISvcCtx OCISvcCtx;
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QOCIDriver;
class QOCICols;
struct QOCIDriverPrivate;

View File

@ -74,6 +74,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QODBCPrivate;
class QODBCDriverPrivate;
class QODBCDriver;

View File

@ -58,6 +58,11 @@ typedef struct pg_result PGresult;
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QPSQLResultPrivate;
class QPSQLDriverPrivate;
class QPSQLDriver;

View File

@ -57,6 +57,12 @@ struct sqlite3;
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QSQLiteDriverPrivate;
class QSQLiteResultPrivate;
class QSQLiteDriver;

View File

@ -58,6 +58,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QSQLite2DriverPrivate;
class QSQLite2ResultPrivate;
class QSQLite2Driver;

View File

@ -71,6 +71,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#if 0
#pragma qt_no_master_include
#pragma qt_sync_stop_processing
#endif
class QTDSDriverPrivate;
class QTDSResultPrivate;
class QTDSDriver;

View File

@ -128,7 +128,7 @@
\endcode
From the qdoc comment above, QDoc generates the now famous HTML
page \l {http://doc.qt.nokia.com/qobject.html#details}
page \l {http://qt-project.org/doc/qt-5.0/qtcore/qobject.html#details}
{QObject Class Reference}.
This manual explains how to use the QDoc commands in qdoc comments
@ -1744,10 +1744,10 @@
\printuntil hello
First we create a \l
{http://qt.nokia.com/doc/4.0/qapplication} {QApplication}
{http://qt-project.org/doc/qt-5.0/qtwidgets/qapplication.html} {QApplication}
object using the \c argc and \c argv parameters, then we
create a \l
{http://qt.nokia.com/doc/4.0/qpushbutton} {QPushButton}.
{http://qt-project.org/doc/qt-5.0/qtwidgets/qpushbutton.html} {QPushButton}.
\endquotation
(\l {Example File} {The complete example file...})
@ -2060,16 +2060,16 @@
\code
/ *!
Read the \l {http://qt.nokia.com/doc/4.0/}
{Qt's Reference Documentation} carefully.
Read the \l {http://qt-project.org/doc/qt-5.0/}
{Qt 5.0 Documentation} carefully.
* /
\endcode
QDoc renders this as:
\quotation
Read the \l {http://qt.nokia.com/doc/4.0/}
{Qt's Reference Documentation} carefully.
Read the \l {http://qt-project.org/doc/qt-5.0/}
{Qt 5.0 Documentation} carefully.
\endquotation
If the link target is equivalent to the link text, the second
@ -2142,7 +2142,7 @@
\li \c {\l network.html} - The file name used in a \l
{page-command} {\\page} command.
\li \c {\l http://qt.nokia.com/} - A URL.
\li \c {\l http://qt-project.org/} - A URL.
\endlist
@ -2271,7 +2271,7 @@
From other documents, the target name can be linked this way:
\list
\li \c {\l http://doc.qt.nokia.com/4.0/qregexp.html#capturing-parentheses}
\li \c {\l http://qt-project.org/doc/qt-5.0/qtcore/qregexp.html#capturing-parentheses}
\endlist
See also \l {l-command} {\\l}, \l {sa-command} {\\sa} and \l
@ -2610,7 +2610,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
<a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
<a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html">
Signals and Slots</a>
</td>
<td>Signals and slots are used for communication
@ -2619,7 +2619,7 @@
<tr valign="top" bgcolor="#c0c0c0">
<td>
<a href=http://qt.nokia.com/doc/4.0/layout.html">
<a href="http://qt-project.org/doc/qt-5.0/qtwidgets/layout.html">
Layout Management</a></td>
<td>The Qt layout system provides a simple
and powerful way of specifying the layout
@ -2628,7 +2628,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
<a href=http://qt.nokia.com/doc/4.0/dnd.html">
<a href="http://qt-project.org/doc/qt-5.0/qtgui/dnd.html">
Drag and Drop</a></td>
<td>Drag and drop provides a simple visual
mechanism which users can use to transfer
@ -2729,7 +2729,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
<a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
<a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html">
Signals and Slots</a>
</td>
<td>Signals and slots are used for communication
@ -2791,7 +2791,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
<a href="http://qt.nokia.com/doc/4.0/signalsandslots.html">
<a href="http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html">
Signals and Slots</a>
</td>
<td>Signals and slots are used for communication
@ -2800,7 +2800,7 @@
<tr valign="top" bgcolor="#c0c0c0">
<td>
<a href=http://qt.nokia.com/doc/4.0/layout.html">
<a href="http://qt-project.org/doc/qt-5.0/qtwidgets/layout.html">
Layout Management</a></td>
<td>The Qt layout system provides a simple
and powerful way of specifying the layout
@ -2809,7 +2809,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td>
<a href=http://qt.nokia.com/doc/4.0/dnd.html">
<a href="http://qt-project.org/doc/qt-5.0/qtgui/dnd.html">
Drag and Drop</a></td>
<td>Drag and drop provides a simple visual
mechanism which users can use to transfer
@ -3213,7 +3213,7 @@
\quotation
\raw HTML
<h3>geometry :
<a href="http://qt.nokia.com/doc/4.0/qrect.html">QRect</a>
<a href="http://qt-project.org/doc/qt-5.0/qtcore/qrect.html">QRect</a>
</h3>
\endraw
@ -3704,11 +3704,11 @@
\l{GNU Lesser General Public License (LGPL)} or the
\l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under
specific licenses from the original authors. Some pieces of code were developed
by Nokia and others originated from third parties.
by Digia and others originated from third parties.
This page lists the licenses used, names the authors, and links
to the places where it is used.
Nokia gratefully acknowledges these and other contributions
Digia gratefully acknowledges these and other contributions
to Qt. We recommend that programs that use Qt also acknowledge
these contributions, and quote these license statements in an
appendix to the documentation.
@ -4642,11 +4642,11 @@
Files:
\list
\li \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
\li \l{http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-imageviewer-imageviewer-cpp.html}
{widgets/imageviewer/imageviewer.cpp}
\li \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
\li \l{http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-imageviewer-imageviewer-h.html}
{widgets/imageviewer/imageviewer.h}
\li \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
\li \l{http://qt-project.org/doc/qt-5.0/qtwidgets/widgets-imageviewer-main-cpp.html}
{widgets/imageviewer/main.cpp}
\endlist
@ -4663,7 +4663,7 @@
\code
/ *!
\externalpage http://doc.qt.nokia.com/index.html
\externalpage http://qt-project.org/doc/
\title Qt Documentation Site
* /
\endcode
@ -4681,7 +4681,7 @@
QDoc renders this as:
\quotation
At the \l {http://doc.qt.nokia.com/index.html}{Qt Documentation Site}
At the \l {http://qt-project.org/doc/}{Qt Documentation Site}
you can find the latest documentation for Qt, Qt Creator, the Qt SDK
and much more.
\endquotation
@ -4692,7 +4692,7 @@
\code
/ *!
At the \l {http://doc.qt.nokia.com/index.html}{Qt Documentation Site}
At the \l {http://qt-project.org/doc/}{Qt Documentation Site}
you can find the latest documentation for Qt, Qt Creator, the Qt SDK
and much more.
* /
@ -4792,7 +4792,7 @@
<table width="100%">
<tr valign="top" bgcolor="#e0e0e0">
<td><b>
<a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
<a href="http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html">QAbstractSocket</a>
</b></td>
<td>
The base functionality common to all socket types
@ -4800,7 +4800,7 @@
<tr valign="top" bgcolor="#e0e0e0">
<td><b>
<a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
<a href="http://qt-project.org/doc/qt-5.0/qtcore/qbuffer.html">QBuffer</a>
</b></td>
<td>
QIODevice interface for a QByteArray
@ -4808,7 +4808,7 @@
<tr valign="top" bgcolor="#e0e0e0">
<td><b>
<a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
<a href="http://qt-project.org/doc/qt-5.0/qtgui/qclipboard.html">QClipboard</a>
</b></td>
<td>
Access to the window system clipboard
@ -4884,7 +4884,7 @@
<h3>Functions</h3>
<ul>
<li>RandomAccessIterator
<a href="http://qt.nokia.com/doc/4.0/qlineedit.html#EchoMode-enum">qBinaryFind</a></b>
<a href="http://qt-project.org/doc/qt-5.0/qtcore/qtalgorithms.html#qBinaryFind">qBinaryFind</a></b>
(RandomAccessIterator begin, RandomAccessIterator end,
const T & value)</li>
<li>...</li></ul>
@ -5054,7 +5054,7 @@
<table width="100%">
<tr valign="top" bgcolor="#d0d0d0">
<td><b>
<a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
<a href="http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html">QAbstractSocket</a>
</b></td>
<td>
The base functionality common to all socket types
@ -5062,7 +5062,7 @@
<tr valign="top" bgcolor="#d0d0d0">
<td><b>
<a href="http://qt.nokia.com/doc/4.0/qftp.html">QFtp</a>
<a href="http://doc.qt.digia.com/4.0/qftp.html">QFtp</a>
</b></td>
<td>
Implementation of the FTP protocol
@ -5133,7 +5133,7 @@
<pre>#include &lt;Qt&gt;</pre>
<ul>
<li>
<a href="http://qt.nokia.com/doc/4.0/qt-qt3.html">
<a href="http://doc.qt.digia.com/4.0/qt-qt3.html">
Qt 3 support members</a></li>
</ul>
@ -5141,7 +5141,7 @@
<h3>Types</h3>
<ul>
<li>flags
<a href="http://qt.nokia.com/doc/4.0/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
<a href="http://doc.qt.digia.com/4.0/qt.html#AlignmentFlag-enum">Alignment</a></b></li>
<li>...</li></ul>
<hr />
\endraw
@ -5332,7 +5332,7 @@
The \\qmlattachedproperty command is for documenting a QML
property that will be attached to some QML type. See
\l{http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#attached-properties}
\l{http://qt-project.org/doc/qt-4.7/qdeclarativeintroduction.html#attached-properties}
{Attached Properties}. The argument is the rest of the line. The
argument text should be the property type, followed by the QML
element name where the property is being declared, the \c{::}
@ -5357,14 +5357,14 @@
\endcode
QDoc includes this attached property on the QML reference page for the
\l{http://doc.qt.nokia.com/4.7/qml-listview.html#isCurrentItem-prop}
\l{http://qt-project.org/doc/qt-4.7/qml-listview.html#isCurrentItem-prop}
{ListView} element.
\target qmlattachedsignal-command
\section1 \\qmlattachedsignal
The \\qmlattachedsignal command is for documenting an attachable
\l{http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#signal-handlers}
\l{http://qt-project.org/doc/qt-4.7/qdeclarativeintroduction.html#signal-handlers}
{signal handler}. The \\qmlattachedsignal command is used just like
the \l{qmlsignal-command} {\\qmlsignal} command.
@ -5383,7 +5383,7 @@
\endcode
QDoc includes this documentation on the QML reference page for the
\l{http://doc.qt.nokia.com/4.7/qml-gridview.html#onAdd-signal}
\l{http://qt-project.org/doc/qt-4.7/qml-gridview.html#onAdd-signal}
{GridView} element.
\target qmlbasictype-command
@ -5394,10 +5394,10 @@
QML basic types group using the \l{ingroup-command}{\\ingroup}
command as shown below. This will cause QDoc to include the
documentation for the type on the
\l{http://doc.qt.nokia.com/4.7/qdeclarativebasictypes.html}
\l{http://qt-project.org/doc/qt-4.7/qdeclarativebasictypes.html}
{QML Basic Types} page. The \l{brief-command} {\\brief} command
is also required, because it appears on the
\l{http://doc.qt.nokia.com/4.7/qdeclarativebasictypes.html}
\l{http://qt-project.org/doc/qt-4.7/qdeclarativebasictypes.html}
{QML Basic Types} page as well.
\code
@ -5421,7 +5421,7 @@
* /
\endcode
QDoc outputs this as \l{http://doc.qt.nokia.com/4.7/qml-int.html}
QDoc outputs this as \l{http://qt-project.org/doc/qt-4.7/qml-int.html}
{qml-int.html}.
\target qmlclass-command
@ -5464,7 +5464,7 @@
\endcode
This example generates the
\l {http://doc.qt.nokia.com/4.7/qml-transform.html} {QML Transform}
\l {http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
page. The \\qmlclass comment should include the \l
{since-command} {\\since} command, because all QML types are
new. It should also include the \l{brief-command} {\\brief}
@ -5496,7 +5496,7 @@
\endcode
QDoc includes this documentation on the element refence page for the
\l{http://doc.qt.nokia.com/4.7/qml-textinput.html#select-method}
\l{http://qt-project.org/doc/qt-4.7/qml-textinput.html#select-method}
{TextInput} element.
\target qmltype-command
@ -5538,7 +5538,7 @@
\endcode
The example generates the \l
{http://doc.qt.nokia.com/4.7/qml-transform.html} {QML Transform}
{http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
page. The \e{\\qmltype} comment includes \l{instantiates-command}
{\\instantiates} to specify that a Transform is instantiated by
the C++ class QGraphicsTransform. A \\qmltype comment should
@ -5572,7 +5572,7 @@
\endcode
QDoc includes this documentation on the element refence page for the
\l{http://doc.qt.nokia.com/4.7/qml-textinput.html#select-method}
\l{http://qt-project.org/doc/qt-4.7/qml-textinput.html#select-method}
{TextInput} element.
\target qmlproperty-command
@ -5594,7 +5594,7 @@
\endcode
QDoc includes this QML property on the QML reference page for the
\l {http://doc.qt.nokia.com/4.7/qml-translate.html} {Translate}
\l {http://qt-project.org/doc/qt-4.7/qml-translate.html} {Translate}
element.
\target qmlsignal-command
@ -5616,7 +5616,7 @@
\endcode
QDoc includes this documentation on the QML reference page for the
\l{http://doc.qt.nokia.com/4.7/qml-mousearea.html#onEntered-signal}
\l{http://qt-project.org/doc/qt-4.7/qml-mousearea.html#onEntered-signal}
{MouseArea} element.
\target qmlmodule-command
@ -5694,7 +5694,7 @@
\endcode
The example generates the \l
{http://doc.qt.nokia.com/4.7/qml-transform.html} {QML Transform}
{http://qt-project.org/doc/qt-4.7/qml-transform.html} {QML Transform}
page. The \e{\\qmltype} comment includes \l{instantiates-command}
{\\instantiates} to specify that a Transform is instantiated by
the C++ class QGraphicsTransform. A \\qmltype comment should
@ -5814,7 +5814,7 @@
\quotation
\raw HTML
<h3>
<a href="http://qt.nokia.com/doc/4.0/qpalette.html">
<a href="http://qt-project.org/doc/qt-5.0/qtgui/qpalette.html">
QPalette
</a>
QStyleOption::palette
@ -6169,7 +6169,7 @@
library.} It is provided to keep old source code
working. We strongly advise against using it in new
code. See the \l
{http://qt.nokia.com/doc/4.0/porting4.html} {Porting
{http://doc.qt.digia.com/4.0/porting4.html} {Porting
Guide} for more information.
\endquotation
@ -6218,7 +6218,7 @@
\section1 \\default
The \\default command is for marking a QML property as the
\l {http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#default-properties}
\l {http://qt-project.org/doc/qt-4.7/qdeclarativeintroduction.html#default-properties}
{default property}. The word \span {class="newStuff"} {default} is shown in red in
the documentation of the property.
@ -6235,7 +6235,7 @@
\endcode
See how QDoc renders this property on the reference page for the
\l {http://doc.qt.nokia.com/4.7/qml-state.html#changes-prop} {State}
\l {http://qt-project.org/doc/qt-4.7/qml-state.html#changes-prop} {State}
type.
\target obsolete-command
@ -6350,7 +6350,7 @@
\quotation
\raw HTML
<h3>
<a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
<a href="http://qt-project.org/doc/qt-5.0/qtcore/qchar.html#Joining-enum">Joining</a>
QChar::joining () const</h3>
\endraw
@ -6369,7 +6369,7 @@
\list
\li ...
\li Joining
\l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
\l {http://qt-project.org/doc/qt-5.0/qtcore/qchar.html#Joining-enum}
{joining}()
const \c (preliminary)
\li ...
@ -6658,11 +6658,11 @@
\endcode
QDoc includes this line on the reference page for the
\l{http://doc.qt.nokia.com/4.7/qml-pauseanimation.html} {PauseAnimation}
\l{http://qt-project.org/doc/qt-4.7/qml-pauseanimation.html} {PauseAnimation}
element:
\quotation
Inherits \l{http://doc.qt.nokia.com/4.7/qml-animation.html} {Animation}
Inherits \l{http://qt-project.org/doc/qt-4.7/qml-animation.html} {Animation}
\endquotation
\target overload-command
@ -6707,13 +6707,13 @@
\quotation
\raw HTML
<h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
<h3><a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qaction.html">QAction</a>
* QMenu::addAction ( const QIcon & <i>icon</i>,
const QString & <i>text</i> )
</h3>
\endraw
This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction} {addAction()}
This function overloads \l {http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#addAction} {addAction()}
This convenience function creates a new action with an
\e icon and some \e text. The function adds the newly
@ -6721,7 +6721,7 @@
returns it.
See also
\l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
\l {http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#addAction}
{QWidget::addAction}().
\endquotation
@ -6832,7 +6832,7 @@
list created by calling the \l {generatelist-command}
{\\generatelist} command with the \c mainclasses argument:
\l http://qt.nokia.com/doc/4.0/mainclasses.html
\l http://doc.qt.digia.com/4.0/mainclasses.html
\note The Qt documentation no longer includes the \e mainclasses
page.
@ -7026,7 +7026,7 @@
is created actually contains XML text, but the \e{.ditamap} suffix is
used to identify the file as containing a DITA MAP.
The argument is the name of the the file to be created. In the following
The argument is the name of the file to be created. In the following
example, the file \e{creator.ditamap} is output:
\code
\ditamap creator.ditamap
@ -8450,7 +8450,7 @@
\endcode
The complete variable entry in \l qt.qdocconf provides the
standard footer of the \l {http://qt.nokia.com/doc/4.0/index.html}
standard footer of the \l {http://doc.qt.digia.com/4.0/index.html}
{Qt Reference Documentation}.
\target HTML.postheader-variable
@ -8479,7 +8479,7 @@
\endcode
The complete variable entry in \l qt.qdocconf provides the
standard header of the \l {http://doc.qt.nokia.com/}
standard header of the \l {http://doc.qt.digia.com/}
{Qt Reference Documentation}.
\target HTML.style-variable
@ -8506,7 +8506,7 @@
\endcode
provides the HTML style for the \l
{http://qt.nokia.com/doc/4.0/index.html} {Qt Reference
{http://doc.qt.digia.com/4.0/index.html} {Qt Reference
Documentation}.
\target HTML.stylesheets-variable
@ -8599,14 +8599,14 @@
\code
project = Qt
description = Qt Reference Documentation
url = http://doc.qt.nokia.com/4.7
url = http://qt-project.org/doc/qt-4.8/
...
\endcode
This makes sure that whenever \c qt.index is used to generate
references to for example Qt classes, the base URL is \c
http://doc.qt.nokia.com/4.7.
http://doc.qt.digia.com/4.7.
See also \l indexes.
@ -8622,7 +8622,7 @@
\code
project = Qt
description = Qt Reference Documentation
url = http://doc.qt.nokia.com/4.7
url = http://qt-project.org/doc/qt-4.8/
...
\endcode
@ -8641,8 +8641,8 @@
\code
project = QtCreator
description = Qt Creator Class Documentation
url = http://doc.qt.nokia.com/qtcreator-2.2
description = Qt Creator Manual
url = http://qt-project.org/doc/qtcreator-2.6/
indexes = $QTDIR/doc/html/qt.index
@ -8806,6 +8806,6 @@
*/
/*!
\externalpage http://qt.nokia.com/about
\externalpage http://qt-project.org/about
\title About Qt
*/

View File

@ -357,8 +357,8 @@ static void processQdocconfFile(const QString &fileName)
QSet<QString> outputFormats = config.getOutputFormats();
Location outputFormatsLocation = config.lastLocation();
if (!Generator::runPrepareOnly())
loadIndexFiles(config);
//if (!Generator::runPrepareOnly())
loadIndexFiles(config);
QSet<QString> excludedDirs;
QSet<QString> excludedFiles;

View File

@ -555,7 +555,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
Node* node,
bool generateInternalNodes)
{
if (node->subType() == Node::DitaMap)
/*
Don't include index nodes in a new index file. Or DITA map nodes.
*/
if (node->isIndexNode() || node->subType() == Node::DitaMap)
return false;
QString nodeName;

View File

@ -827,9 +827,12 @@ void QDialog::adjustPosition(QWidget* w)
if (w) {
// Use mapToGlobal rather than geometry() in case w might
// be embedded in another application
QPoint pp = w->mapToGlobal(QPoint(0,0));
// Use pos() if the widget is embedded into a native window
QPoint pp;
if (w->windowHandle() && w->windowHandle()->property("_q_embedded_native_parent_handle").value<WId>())
pp = w->pos();
else
pp = w->mapToGlobal(QPoint(0,0));
p = QPoint(pp.x() + w->width()/2,
pp.y() + w->height()/ 2);
} else {

View File

@ -58,7 +58,7 @@
\table 100%
\row
\li \image fusion-groupbox.png
The The QGroupBox widget provides a group box frame with a title.
The QGroupBox widget provides a group box frame with a title.
\li \image fusion-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image fusion-frame.png

View File

@ -62,7 +62,7 @@
\table 100%
\row
\li \image gtk-groupbox.png
The The QGroupBox widget provides a group box frame with a title.
The QGroupBox widget provides a group box frame with a title.
\li \image gtk-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image gtk-frame.png

View File

@ -62,7 +62,7 @@
\table 100%
\row
\li \image macintosh-groupbox.png
The The QGroupBox widget provides a group box frame with a title.
The QGroupBox widget provides a group box frame with a title.
\li \image macintosh-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image macintosh-frame.png

View File

@ -58,7 +58,7 @@
\table 100%
\row
\li \image windows-groupbox.png
The The QGroupBox widget provides a group box frame with a title.
The QGroupBox widget provides a group box frame with a title.
\li \image windows-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image windows-frame.png

View File

@ -62,7 +62,7 @@
\table 100%
\row
\li \image windowsvista-groupbox.png
The The QGroupBox widget provides a group box frame with a title.
The QGroupBox widget provides a group box frame with a title.
\li \image windowsvista-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image windowsvista-frame.png

View File

@ -62,7 +62,7 @@
\table 100%
\row
\li \image windowsxp-groupbox.png
The The QGroupBox widget provides a group box frame with a title.
The QGroupBox widget provides a group box frame with a title.
\li \image windowsxp-tabwidget.png
The QTabWidget class provides a stack of tabbed widgets.
\li \image windowsxp-frame.png

View File

@ -813,7 +813,7 @@
In the case of a checkable QGroupBox, the title includes the
check indicator. The indicator is styled using the
the \l{#indicator-sub}{::indicator} subcontrol. The
\l{#indicator-sub}{::indicator} subcontrol. The
\l{#spacing-prop}{spacing} property can be used to control
the spacing between the text and indicator.

View File

@ -579,6 +579,7 @@ void QApplicationPrivate::construct()
void qRegisterGuiStateMachine();
void qUnregisterGuiStateMachine();
#endif
extern void qRegisterWidgetsVariant();
/*!
\fn void QApplicationPrivate::initialize()
@ -590,6 +591,9 @@ void QApplicationPrivate::initialize()
QWidgetPrivate::mapper = new QWidgetMapper;
QWidgetPrivate::allWidgets = new QWidgetSet;
// needed for a static build.
qRegisterWidgetsVariant();
if (application_type != QApplicationPrivate::Tty)
(void) QApplication::style(); // trigger creation of application style
#ifndef QT_NO_STATEMACHINE
@ -2217,12 +2221,17 @@ Q_WIDGETS_EXPORT bool qt_tryModalHelper(QWidget *widget, QWidget **rettop)
bool QApplicationPrivate::isBlockedByModal(QWidget *widget)
{
widget = widget->window();
return self->isWindowBlocked(widget->windowHandle());
QWindow *window = widget->windowHandle();
return window && self->isWindowBlocked(window);
}
bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const
{
QWindow *unused = 0;
if (!window) {
qWarning().nospace() << "window == 0 passed.";
return false;
}
if (!blockingWindow)
blockingWindow = &unused;

View File

@ -2080,8 +2080,15 @@ void QWidgetPrivate::setOpaque(bool opaque)
void QWidgetPrivate::updateIsTranslucent()
{
Q_Q(QWidget);
if (QWindow *window = q->windowHandle())
window->setOpacity(isOpaque ? qreal(1.0) : qreal(0.0));
if (QWindow *window = q->windowHandle()) {
QSurfaceFormat format = window->format();
const int oldAlpha = format.alphaBufferSize();
const int newAlpha = q->testAttribute(Qt::WA_TranslucentBackground)? 8 : 0;
if (oldAlpha != newAlpha) {
format.setAlphaBufferSize(newAlpha);
window->setFormat(format);
}
}
}
static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrush &brush)

View File

@ -597,12 +597,14 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event
if (QTLWExtra *tle = m_widget->d_func()->maybeTopData())
tle->normalGeometry = m_widget->geometry();
widgetState |= Qt::WindowMaximized;
widgetState &= ~(Qt::WindowMinimized | Qt::WindowFullScreen);
break;
case Qt::WindowFullScreen:
if (effectiveState(widgetState) == Qt::WindowNoState)
if (QTLWExtra *tle = m_widget->d_func()->maybeTopData())
tle->normalGeometry = m_widget->geometry();
widgetState |= Qt::WindowFullScreen;
widgetState &= ~(Qt::WindowMinimized);
break;
case Qt::WindowActive: // Not handled by QWindow
break;

View File

@ -1149,7 +1149,7 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const
stopAnimation(animation->target());
q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection);
animations.insert(animation->target(), animation);
animation->start();
animation->start(QAbstractAnimation::DeleteWhenStopped);
}
/*! \internal */

View File

@ -317,7 +317,7 @@ static GdkColor fromQColor(const QColor &color)
It does this by making use of the GTK+ theme engine, ensuring
that Qt applications look and feel native on these platforms.
Note: The style requires GTK+ version 2.10 or later.
Note: The style requires GTK+ version 2.18 or later.
The Qt3-based "Qt" GTK+ theme engine will not work with QGtkStyle.
\sa QWindowsXPStyle, QMacStyle, QWindowsStyle, QFusionStyle

View File

@ -579,7 +579,17 @@ void QGtkStylePrivate::initGtkWidgets() const
addWidget(QGtkStylePrivate::gtk_combo_box_entry_new());
if (gtk_combo_box_new_with_entry)
addWidget(QGtkStylePrivate::gtk_combo_box_new_with_entry());
addWidget(QGtkStylePrivate::gtk_entry_new());
GtkWidget *entry = QGtkStylePrivate::gtk_entry_new();
// gtk-im-context-none is supported in gtk+ since 2.19.5
// and also exists in gtk3
// http://git.gnome.org/browse/gtk+/tree/gtk/gtkimmulticontext.c?id=2.19.5#n33
// reason that we don't use gtk-im-context-simple here is,
// gtk-im-context-none has less overhead, and 2.19.5 is
// relatively old. and even for older gtk+, it will fallback
// to gtk-im-context-simple if gtk-im-context-none doesn't
// exists.
g_object_set(entry, "im-module", "gtk-im-context-none", NULL);
addWidget(entry);
addWidget(QGtkStylePrivate::gtk_frame_new(NULL));
addWidget(QGtkStylePrivate::gtk_expander_new(""));
addWidget(QGtkStylePrivate::gtk_statusbar_new());

View File

@ -3101,7 +3101,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
CGContextScaleCTM(cg, 1, -1);
CGContextTranslateCTM(cg, -rect.origin.x, -rect.origin.y);
[triangleCell drawBezelWithFrame:rect inView:[triangleCell controlView]];
[triangleCell drawBezelWithFrame:NSRectFromCGRect(rect) inView:[triangleCell controlView]];
[NSGraphicsContext restoreGraphicsState];
CGContextRestoreGState(cg);
@ -5028,7 +5028,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
// Draw the track when hovering
if (opt->activeSubControls || wasActive) {
CGRect rect = [scroller bounds];
NSRect rect = [scroller bounds];
if (shouldExpand) {
if (isHorizontal)
rect.origin.y += 4.5 - expandOffset;
@ -6518,6 +6518,9 @@ void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig
// move to QRegion?
void qt_mac_scale_region(QRegion *region, qreal scaleFactor)
{
if (!region || !region->rectCount())
return;
QVector<QRect> scaledRects;
scaledRects.reserve(region->rects().count());

View File

@ -49,7 +49,6 @@ QT_BEGIN_NAMESPACE
QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(target),
_delay(0), _duration(-1), _startTime(QTime::currentTime())
{
connect(this, SIGNAL(finished()), SLOT(deleteLater()));
}
QStyleAnimation::~QStyleAnimation()

View File

@ -181,6 +181,24 @@ QStyleOption *clonedAnimationStyleOption(const QStyleOption*option) {
return styleOption;
}
/* \internal
Used by animations to delete cloned styleoption
*/
void deleteClonedAnimationStyleOption(const QStyleOption *option)
{
if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider*>(option))
delete slider;
else if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox*>(option))
delete spinbox;
else if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox*>(option))
delete groupBox;
else if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox*>(option))
delete combo;
else if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton*>(option))
delete button;
else
delete option;
}
/*!
\class QWindowsVistaStyle
@ -411,7 +429,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
}
t->setStartTime(QTime::currentTime());
delete styleOption;
deleteClonedAnimationStyleOption(styleOption);
d->startAnimation(t);
}
styleObject->setProperty("_q_no_animation", false);
@ -940,7 +958,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
t->setStartTime(QTime::currentTime());
styleObject->setProperty("_q_no_animation", false);
delete styleOption;
deleteClonedAnimationStyleOption(styleOption);
d->startAnimation(t);
}
@ -1627,7 +1645,7 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle
else
t->setDuration(500);
delete styleOption;
deleteClonedAnimationStyleOption(styleOption);
d->startAnimation(t);
}
if (QWindowsVistaAnimation *anim = qobject_cast<QWindowsVistaAnimation *>(d->animation(styleObject))) {

View File

@ -2722,7 +2722,7 @@ void QMenu::keyPressEvent(QKeyEvent *e)
key_consumed = true;
if(d->scroll)
d->scrollMenu(nextAction, QMenuPrivate::QMenuScroller::ScrollCenter, false);
d->setCurrentAction(nextAction, 20, QMenuPrivate::SelectedFromElsewhere, true);
d->setCurrentAction(nextAction, 0, QMenuPrivate::SelectedFromElsewhere, true);
if (!nextAction->menu() && activateAction) {
d->setSyncAction();
d->activateAction(nextAction, QAction::Trigger);

File diff suppressed because it is too large Load Diff

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7f392298f780) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7f392298f840) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb5916b60) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb5916bd0) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7fbaa40ac7e0) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7fbaa40ac8a0) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb58afb60) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb58afbd0) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7f7183136c60) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7f7183136d20) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb566de70) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb566dee0) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7fb656ca6780) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7fb656ca6840) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb58ccb98) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb58ccc08) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7f04bbe9c120) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7f04bbe9c1e0) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb5748000) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb5748070) 0
Class tm
size=44 align=4
base size=44 base align=4

File diff suppressed because it is too large Load Diff

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7f5e7ddaf780) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7f5e7ddaf840) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb58d6b60) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb58d6bd0) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7fdcec3fc900) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7fdcec3fc9c0) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb58d2bd0) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb58d2c40) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0x7f8722956cc0) 0
Class timex
size=208 align=8
base size=208 base align=8
timex (0x7f8722956d80) 0
Class tm
size=56 align=8
base size=56 base align=8

View File

@ -261,11 +261,6 @@ Class __sched_param
base size=4 base align=4
__sched_param (0xb56fd000) 0
Class timex
size=128 align=4
base size=128 base align=4
timex (0xb56fd070) 0
Class tm
size=44 align=4
base size=44 base align=4

View File

@ -51,6 +51,7 @@
#include <private/qabstractfileengine_p.h>
#include <private/qfsfileengine_p.h>
#include <private/qfilesystemengine_p.h>
#ifdef Q_OS_WIN
QT_BEGIN_NAMESPACE
@ -2418,6 +2419,7 @@ void tst_QFile::rename_data()
#endif
QTest::newRow("renamefile -> renamedfile") << QString::fromLatin1(renameSourceFile) << QString("renamedfile") << true;
QTest::newRow("renamefile -> ..") << QString::fromLatin1(renameSourceFile) << QString("..") << false;
QTest::newRow("renamefile -> rEnAmEfIlE") << QString::fromLatin1(renameSourceFile) << QStringLiteral("rEnAmEfIlE") << true;
}
void tst_QFile::rename()
@ -2435,7 +2437,8 @@ void tst_QFile::rename()
}
#endif
QFile sourceFile(QString::fromLatin1(renameSourceFile));
const QString sourceFileName = QString::fromLatin1(renameSourceFile);
QFile sourceFile(sourceFileName);
QVERIFY2(sourceFile.open(QFile::WriteOnly | QFile::Text), qPrintable(sourceFile.errorString()));
QVERIFY2(sourceFile.write(content), qPrintable(sourceFile.errorString()));
sourceFile.close();
@ -2445,7 +2448,10 @@ void tst_QFile::rename()
if (result) {
QVERIFY2(success, qPrintable(file.errorString()));
QCOMPARE(file.error(), QFile::NoError);
QVERIFY(!sourceFile.exists());
// This will report the source file still existing for a rename changing the case
// on Windows, Mac.
if (sourceFileName.compare(destination, Qt::CaseInsensitive))
QVERIFY(!sourceFile.exists());
QFile destinationFile(destination);
QVERIFY2(destinationFile.open(QFile::ReadOnly | QFile::Text), qPrintable(destinationFile.errorString()));
QCOMPARE(destinationFile.readAll(), content);

Some files were not shown because too many files have changed in this diff Show More