Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release' into stable
Browse files Browse the repository at this point in the history
Manually fixed up: isES -> isOpenGLES
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp

Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
  • Loading branch information
gladhorn committed May 2, 2014
2 parents beb7258 + 9ae8931 commit e6286ca
Show file tree
Hide file tree
Showing 35 changed files with 222 additions and 85 deletions.
9 changes: 9 additions & 0 deletions dist/changes-5.3.0
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,15 @@ Android
- Fonts:
* [QTBUG-36789] Fixed support for Arabic text.

iOS
---

- Support for input methods added.
- Support for word completion and spell checking added.
- Support for QClipboard added.
- "Hide keyboard" gesture added.
- Keyboard input is now sendt as input method events instead of key events.

Linux
-----

Expand Down
27 changes: 27 additions & 0 deletions mkspecs/features/qt_helper_lib.prf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# W A R N I N G
# -------------
#
# This file is not part of the Qt API. It exists purely as an
# implementation detail. It may change from version to version
# without notice, or even be removed.
#
# We mean it.
#

load(qt_build_paths)

TEMPLATE = lib
CONFIG -= qt

contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
contains(QT_CONFIG, build_all): CONFIG += build_all

DESTDIR = $$MODULE_BASE_OUTDIR/lib
DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin

# Static builds always need to be installed, as the convenience libraries
# are not linked to the final library in this case.
installed|static: load(qt_installs)

TARGET = $$qtLibraryTarget($$TARGET)
2 changes: 1 addition & 1 deletion mkspecs/macx-ios-clang/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ equals(TEMPLATE, app):contains(QT, gui(-private)?) {
# We do link and dependency resolution for the platform plugin
# manually, since we know we always need the plugin, so we don't
# need to generate an import for it.
CONFIG -= import_qpa_plugin
QTPLUGIN.platforms = -

!no_main_wrapper {
# We use ld to rename the _main symbol to _qt_main, so that we don't get a symbol clash
Expand Down
9 changes: 1 addition & 8 deletions src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
TARGET = qtharfbuzzng
TEMPLATE = lib

CONFIG += \
static \
hide_symbols \
exceptions_off rtti_off
CONFIG -= qt

contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all

DESTDIR = $$QT_BUILD_TREE/lib
load(qt_helper_lib)

DEFINES += HAVE_CONFIG_H
HEADERS += $$PWD/src/config.h
Expand Down Expand Up @@ -133,5 +128,3 @@ mac {
# even in 10.8 where they were also made available stand-alone.
LIBS_PRIVATE += -framework ApplicationServices
}

TARGET = $$TARGET$$qtPlatformTargetSuffix()
6 changes: 1 addition & 5 deletions src/3rdparty/harfbuzz-ng/src/hb-coretext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -690,13 +690,10 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
*/
CFDictionaryRef attributes = CTRunGetAttributes (run);
CTFontRef run_ct_font = static_cast<CTFontRef>(CFDictionaryGetValue (attributes, kCTFontAttributeName));
CGFontRef run_cg_font = CTFontCopyGraphicsFont (run_ct_font, 0);

CFRange range = CTRunGetStringRange (run);
if (!CFEqual (run_cg_font, face_data->cg_font))
if (!CFEqual (run_ct_font, font_data->ct_font))
{
CFRelease (run_cg_font);

buffer->ensure (buffer->len + range.length);
if (buffer->in_error)
FAIL ("Buffer resize failed");
Expand Down Expand Up @@ -731,7 +728,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
}
continue;
}
CFRelease (run_cg_font);

/* CoreText throws away the PDF token, while the OpenType backend will add a zero-advance
* glyph for this. We need to make sure the two produce the same output. */
Expand Down
1 change: 1 addition & 0 deletions src/angle/src/common/common.pri
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG += installed
include (../config.pri)

INCLUDEPATH += \
Expand Down
3 changes: 0 additions & 3 deletions src/angle/src/compiler/preprocessor/preprocessor.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
TEMPLATE = lib
CONFIG += static
TARGET = $$qtLibraryTarget(preprocessor)

include(../../config.pri)

INCLUDEPATH = $$ANGLE_DIR/src/compiler/preprocessor
Expand Down
3 changes: 0 additions & 3 deletions src/angle/src/compiler/translator.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
TEMPLATE = lib
CONFIG += static
TARGET = $$qtLibraryTarget(translator)

include(../config.pri)

# Mingw 4.7 chokes on implicit move semantics, so disable C++11 here
Expand Down
9 changes: 2 additions & 7 deletions src/angle/src/config.pri
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,10 @@ CONFIG(debug, debug|release) {
}

# c++11 is needed by MinGW to get support for unordered_map.
CONFIG -= qt
CONFIG += stl exceptions c++11

contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all

INCLUDEPATH += . .. $$PWD/../include

DESTDIR = $$QT_BUILD_TREE/lib
DLLDESTDIR = $$QT_BUILD_TREE/bin

msvc {
# Disabled Warnings:
# 4100: 'identifier' : unreferenced formal parameter
Expand Down Expand Up @@ -107,3 +100,5 @@ gcc {

QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE

load(qt_helper_lib)
9 changes: 3 additions & 6 deletions src/angle/src/d3dcompiler/d3dcompiler.pro
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
TEMPLATE = lib
TARGET = $$qtLibraryTarget(d3dcompiler_qt)

TARGET = d3dcompiler_qt
CONFIG += installed
include(../config.pri)
CONFIG += qt

CONFIG += qt
QT = core
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
SOURCES += main.cpp
Expand All @@ -16,5 +15,3 @@ winrt:equals(WINSDK_VER, 8.1) {

# __stdcall exports get mangled, so use a def file
DEF_FILE += $${TARGET}.def

load(qt_installs)
6 changes: 1 addition & 5 deletions src/angle/src/libEGL/libEGL.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
TEMPLATE = lib
TARGET = $$qtLibraryTarget(libEGL)

CONFIG += installed
include(../common/common.pri)

angle_d3d11: \
Expand Down Expand Up @@ -30,8 +28,6 @@ SOURCES += \
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}_mingw32.def
}

load(qt_installs)

egl_headers.files = \
$$ANGLE_DIR/include/EGL/egl.h \
$$ANGLE_DIR/include/EGL/eglext.h \
Expand Down
11 changes: 2 additions & 9 deletions src/angle/src/libGLESv2/libGLESv2.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
TEMPLATE = lib
TARGET = $$qtLibraryTarget(libGLESv2)
CONFIG += simd

CONFIG += simd installed
include(../common/common.pri)

INCLUDEPATH += $$OUT_PWD/.. $$ANGLE_DIR/src/libGLESv2
Expand All @@ -13,8 +10,8 @@ angle_d3d11: \
LIBS_PRIVATE += -ld3d9

LIBS_PRIVATE += -ldxguid
STATICLIBS = translator preprocessor

STATICLIBS = translator preprocessor
for(libname, STATICLIBS) {
# Appends 'd' to the library for debug builds and builds up the fully
# qualified path to pass to the linker.
Expand Down Expand Up @@ -238,8 +235,6 @@ for (vs, VERTEX_SHADERS_CLEAR) {
angle_d3d11: QMAKE_EXTRA_COMPILERS += fxc_vs_$${vs}
}

load(qt_installs)

khr_headers.files = $$ANGLE_DIR/include/KHR/khrplatform.h
khr_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/KHR
gles2_headers.files = \
Expand All @@ -248,5 +243,3 @@ gles2_headers.files = \
$$ANGLE_DIR/include/GLES2/gl2platform.h
gles2_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/GLES2
INSTALLS += khr_headers gles2_headers


3 changes: 2 additions & 1 deletion src/corelib/doc/qtcore.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ qhp.QtCore.subprojects.classes.sortPages = true

tagfile = ../../../doc/qtcore/qtcore.tags

depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtqml qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
# depends += qtqml # Qt namespace collides with QtQml::Qt, see QTBUG-38630

headerdirs += ..

Expand Down
6 changes: 6 additions & 0 deletions src/corelib/io/qloggingcategory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
by a string - at runtime. Whether a category should be actually logged or
not can be checked with the \l isEnabled() methods.
All objects are meant to be configured by a common registry (see also
\l{Configuring Categories}). Different objects can also represent the same
category. It's therefore not recommended to export objects across module
boundaries, nor to manipulate the objects directly, nor to inherit from
QLoggingCategory.
\section1 Creating category objects
The Q_LOGGING_CATEGORY() and the Q_DECLARE_LOGGING_CATEGORY() macros
Expand Down
1 change: 1 addition & 0 deletions src/corelib/kernel/qmetatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ struct VariantData
const void *data;
const uint flags;
private:
// copy constructor allowed to be implicit to silence level 4 warning from MSVC
VariantData &operator=(const VariantData &) Q_DECL_EQ_DELETE;
};

Expand Down
8 changes: 1 addition & 7 deletions src/corelib/tools/qtimezoneprivate_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
void QMacTimeZonePrivate::init(const QByteArray &ianaId)
{
if (availableTimeZoneIds().contains(ianaId)) {
m_nstz = [NSTimeZone timeZoneWithName:QCFString::toNSString(QString::fromUtf8(ianaId))];
m_nstz = [[NSTimeZone timeZoneWithName:QCFString::toNSString(QString::fromUtf8(ianaId))] retain];
if (m_nstz)
m_id = ianaId;
}
Expand Down Expand Up @@ -142,7 +142,6 @@
NSString *macLocaleCode = QCFString::toNSString(locale.name());
NSLocale *macLocale = [[NSLocale alloc] initWithLocaleIdentifier:macLocaleCode];
const QString result = QCFString::toQString([m_nstz localizedName:style locale:macLocale]);
[macLocaleCode release];
[macLocale release];
return result;
}
Expand Down Expand Up @@ -192,7 +191,6 @@
data.daylightTimeOffset = [m_nstz daylightSavingTimeOffsetForDate:date];
data.standardTimeOffset = data.offsetFromUtc - data.daylightTimeOffset;
data.abbreviation = QCFString::toQString([m_nstz abbreviationForDate:date]);
[date release];
return data;
}

Expand All @@ -203,8 +201,6 @@
NSDate *epoch = [NSDate dateWithTimeIntervalSince1970:0];
const NSDate *date = [m_nstz nextDaylightSavingTimeTransitionAfterDate:epoch];
const bool result = ([date timeIntervalSince1970] > [epoch timeIntervalSince1970]);
[epoch release];
[date release];
return result;
}

Expand All @@ -224,7 +220,6 @@
tran.daylightTimeOffset = [m_nstz daylightSavingTimeOffsetForDate:nextDate];
tran.standardTimeOffset = tran.offsetFromUtc - tran.daylightTimeOffset;
tran.abbreviation = QCFString::toQString([m_nstz abbreviationForDate:nextDate]);
[nextDate release];
return tran;
}

Expand All @@ -246,7 +241,6 @@
nextDate = [m_nstz nextDaylightSavingTimeTransitionAfterDate:nextDate];
nextSecs = [nextDate timeIntervalSince1970];
}
[nextDate release];
}
if (secsList.size() >= 1)
return data(qint64(secsList.last()) * 1000);
Expand Down
8 changes: 1 addition & 7 deletions src/gui/kernel/qopenglcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,13 @@ class Q_GUI_EXPORT QOpenGLContext : public QObject

enum OpenGLModuleType {
LibGL,
LibGLES,

// ###
DesktopGL = LibGL,
GLES2 = LibGLES
LibGLES
};

static OpenGLModuleType openGLModuleType();

bool isOpenGLES() const;

bool isES() const { return isOpenGLES(); } // ###

Q_SIGNALS:
void aboutToBeDestroyed();

Expand Down
2 changes: 1 addition & 1 deletion src/gui/kernel/qwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public Q_SLOTS:
void screenChanged(QScreen *screen);
void modalityChanged(Qt::WindowModality modality);
void windowStateChanged(Qt::WindowState windowState);
void windowTitleChanged(const QString &title);
Q_REVISION(2) void windowTitleChanged(const QString &title);

void xChanged(int arg);
void yChanged(int arg);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/text/qtextcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int position

void QTextCursorPrivate::setX()
{
if (priv->isInEditBlock()) {
if (priv->isInEditBlock() || priv->inContentsChange) {
x = -1; // mark dirty
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/text/qtextengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ void QTextEngine::justify(const QScriptLine &line)
// subtract one char more, as we can't justfy after the last character
--line_length;

if (!line_length)
if (line_length <= 0)
return;

int firstItem = findItem(line.from);
Expand Down
2 changes: 1 addition & 1 deletion src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture()
currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);

GLuint wrapMode = GL_REPEAT;
if (ctx->contextHandle()->isES()) {
if (ctx->contextHandle()->isOpenGLES()) {
// OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead,
// we emulate GL_REPEAT by only taking the fractional part of the texture coords
// in the qopenglslTextureBrushSrcFragmentShader program.
Expand Down
27 changes: 24 additions & 3 deletions src/platformsupport/eglconvenience/qeglplatformcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ QEGLPlatformCursor::QEGLPlatformCursor(QPlatformScreen *screen)
m_vertexCoordEntry(0),
m_textureCoordEntry(0),
m_textureEntry(0),
m_deviceListener(0)
m_deviceListener(0),
m_updater(screen)
{
QByteArray hideCursorVal = qgetenv("QT_QPA_EGLFS_HIDECURSOR");
if (!hideCursorVal.isEmpty())
Expand Down Expand Up @@ -270,12 +271,32 @@ bool QEGLPlatformCursor::setCurrentCursor(QCursor *cursor)
}
#endif

void QEGLPlatformCursor::update(const QRegion &rgn)
void QEGLPlatformCursorUpdater::update(const QPoint &pos, const QRegion &rgn)
{
QWindowSystemInterface::handleExposeEvent(m_screen->topLevelAt(m_cursor.pos), rgn);
m_active = false;
QWindowSystemInterface::handleExposeEvent(m_screen->topLevelAt(pos), rgn);
QWindowSystemInterface::flushWindowSystemEvents();
}

void QEGLPlatformCursorUpdater::scheduleUpdate(const QPoint &pos, const QRegion &rgn)
{
if (m_active)
return;

m_active = true;

// Must not flush the window system events directly from here since we are likely to
// be a called directly from QGuiApplication's processMouseEvents. Flushing events
// could cause reentering by dispatching more queued mouse events.
QMetaObject::invokeMethod(this, "update", Qt::QueuedConnection,
Q_ARG(QPoint, pos), Q_ARG(QRegion, rgn));
}

void QEGLPlatformCursor::update(const QRegion &rgn)
{
m_updater.scheduleUpdate(m_cursor.pos, rgn);
}

QRect QEGLPlatformCursor::cursorRect() const
{
return QRect(m_cursor.pos - m_cursor.hotSpot, m_cursor.size);
Expand Down
Loading

0 comments on commit e6286ca

Please sign in to comment.