From 715a8e6f4ed3f8fd5c6d98c88b6260e5c1dba428 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 15 Sep 2015 15:51:43 +0200 Subject: Avoid image copy in toTexture() on GLES 3.0 as well The default backingstore implementation is now cleaned for ES_2 ifdefs. All the checks are now done at runtime and ES 3.0+ is included as well for the efficient, QImage::copy()-less path. For embedded a customized backingstore is used so the change has to be done separately there. This should result in a slight improvement for QOpenGLWidget/QQuickWidget when running on GLES 3.x. Task-number: QTBUG-37624 Change-Id: I107330c25a993c5cdcd92e4ebdc17ae172a03da8 Reviewed-by: Paul Olav Tvete --- src/gui/painting/qplatformbackingstore.cpp | 29 ++++++----- .../qopenglcompositorbackingstore.cpp | 58 ++++++++++++++-------- 2 files changed, 53 insertions(+), 34 deletions(-) diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index c86fdebea5..dd02e24676 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -48,6 +48,16 @@ #include #include +#ifndef GL_TEXTURE_BASE_LEVEL +#define GL_TEXTURE_BASE_LEVEL 0x813C +#endif +#ifndef GL_TEXTURE_MAX_LEVEL +#define GL_TEXTURE_MAX_LEVEL 0x813D +#endif +#ifndef GL_UNPACK_ROW_LENGTH +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#endif + QT_BEGIN_NAMESPACE class QPlatformBackingStorePrivate @@ -311,12 +321,11 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i funcs->glDeleteTextures(1, &d_ptr->textureId); funcs->glGenTextures(1, &d_ptr->textureId); funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId); -#ifndef QT_OPENGL_ES_2 - if (!QOpenGLContext::currentContext()->isOpenGLES()) { + QOpenGLContext *ctx = QOpenGLContext::currentContext(); + if (!ctx->isOpenGLES() || ctx->format().majorVersion() >= 3) { funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); } -#endif funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); @@ -435,18 +444,16 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion, QSize *textu image = image.convertToFormat(QImage::Format_RGBA8888); QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions(); - if (resized) { if (d_ptr->textureId) funcs->glDeleteTextures(1, &d_ptr->textureId); funcs->glGenTextures(1, &d_ptr->textureId); funcs->glBindTexture(GL_TEXTURE_2D, d_ptr->textureId); -#ifndef QT_OPENGL_ES_2 - if (!QOpenGLContext::currentContext()->isOpenGLES()) { + QOpenGLContext *ctx = QOpenGLContext::currentContext(); + if (!ctx->isOpenGLES() || ctx->format().majorVersion() >= 3) { funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); } -#endif funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); @@ -459,15 +466,13 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion, QSize *textu QRect imageRect = image.rect(); QRect rect = dirtyRegion.boundingRect() & imageRect; -#ifndef QT_OPENGL_ES_2 - if (!QOpenGLContext::currentContext()->isOpenGLES()) { + QOpenGLContext *ctx = QOpenGLContext::currentContext(); + if (!ctx->isOpenGLES() || ctx->format().majorVersion() >= 3) { funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width()); funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE, image.constScanLine(rect.y()) + rect.x() * 4); funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - } else -#endif - { + } else { // if the rect is wide enough it's cheaper to just // extend it instead of doing an image copy if (rect.width() >= imageRect.width() / 2) { diff --git a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp index 8ce1ed2d2b..bb3ea6981a 100644 --- a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp +++ b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp @@ -39,6 +39,10 @@ #include "qopenglcompositorbackingstore_p.h" #include "qopenglcompositor_p.h" +#ifndef GL_UNPACK_ROW_LENGTH +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#endif + QT_BEGIN_NAMESPACE /*! @@ -100,29 +104,39 @@ void QOpenGLCompositorBackingStore::updateTexture() QRegion fixed; QRect imageRect = m_image.rect(); - foreach (const QRect &rect, m_dirty.rects()) { - // intersect with image rect to be sure - QRect r = imageRect & rect; - - // if the rect is wide enough it's cheaper to just - // extend it instead of doing an image copy - if (r.width() >= imageRect.width() / 2) { - r.setX(0); - r.setWidth(imageRect.width()); + QOpenGLContext *ctx = QOpenGLContext::currentContext(); + if (!ctx->isOpenGLES() || ctx->format().majorVersion() >= 3) { + foreach (const QRect &rect, m_dirty.rects()) { + QRect r = imageRect & rect; + glPixelStorei(GL_UNPACK_ROW_LENGTH, m_image.width()); + glTexSubImage2D(GL_TEXTURE_2D, 0, r.x(), r.y(), r.width(), r.height(), GL_RGBA, GL_UNSIGNED_BYTE, + m_image.constScanLine(r.y()) + r.x() * 4); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } - - fixed |= r; - } - - foreach (const QRect &rect, fixed.rects()) { - // if the sub-rect is full-width we can pass the image data directly to - // OpenGL instead of copying, since there's no gap between scanlines - if (rect.width() == imageRect.width()) { - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE, - m_image.constScanLine(rect.y())); - } else { - glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE, - m_image.copy(rect).constBits()); + } else { + foreach (const QRect &rect, m_dirty.rects()) { + // intersect with image rect to be sure + QRect r = imageRect & rect; + + // if the rect is wide enough it's cheaper to just + // extend it instead of doing an image copy + if (r.width() >= imageRect.width() / 2) { + r.setX(0); + r.setWidth(imageRect.width()); + } + + fixed |= r; + } + foreach (const QRect &rect, fixed.rects()) { + // if the sub-rect is full-width we can pass the image data directly to + // OpenGL instead of copying, since there's no gap between scanlines + if (rect.width() == imageRect.width()) { + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE, + m_image.constScanLine(rect.y())); + } else { + glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, GL_UNSIGNED_BYTE, + m_image.copy(rect).constBits()); + } } } -- cgit v1.2.3 From 5d5e0a4e976622bc3db8b1f7f70041ff71e45085 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sat, 29 Aug 2015 15:21:43 -0400 Subject: Avoid triggering OpenGL initialization for RasterSurface Application that do not require OpenGL need a way to opt-out of GLX/EGL calls completely. The initialization can be expensive and what is more, some systems may not have functional GLX at all (some VMs are known to crash when trying to get FBConfigs for the window). QApplication already has AA_ForceRasterWidgets, which causes the use of plain RasterSurface everywhere instead of RasterGLSurface. Combined with a trivial check in the xcb backend to skip all the Xlib+GLX/EGL path, the attribute will allow apps to ensure that no GLX/EGL calls are ever made. This however implies a change in QWindowContainer: the embedded window must use the same initialization path as the parent otherwise we will end up with a BadMatch. QWindowContainer can do this transparently to the applications, unless the QWindow is already created. Change-Id: I846af7edb8b92b9836cdbd93c6a5eec5a6147a49 Task-number: QTBUG-46765 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/xcb/qxcbwindow.cpp | 3 ++- src/widgets/kernel/qwindowcontainer.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index e7f5bbf0e9..bde8826792 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -389,7 +389,8 @@ void QXcbWindow::create() resolveFormat(); #ifdef XCB_USE_XLIB - if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { + if (window()->surfaceType() != QSurface::RasterSurface + && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { XVisualInfo *visualInfo = Q_NULLPTR; if (connection()->hasDefaultVisualId()) visualInfo = CREATE_VISUALINFO_FROM_DEFAULT_VISUALID(this); diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index 9d3a4ef0b2..3885431b05 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -34,6 +34,8 @@ #include "qwindowcontainer_p.h" #include "qwidget_p.h" #include +#include +#include #include #include @@ -196,6 +198,13 @@ QWindowContainer::QWindowContainer(QWindow *embeddedWindow, QWidget *parent, Qt: return; } + // The embedded QWindow must use the same logic as QWidget when it comes to the surface type. + // Otherwise we may end up with BadMatch failures on X11. + if (embeddedWindow->surfaceType() == QSurface::RasterSurface + && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::RasterGLSurface) + && !QApplication::testAttribute(Qt::AA_ForceRasterWidgets)) + embeddedWindow->setSurfaceType(QSurface::RasterGLSurface); + d->window = embeddedWindow; d->window->setParent(&d->fakeParent); setAcceptDrops(true); -- cgit v1.2.3 From 26a89e7bf7c39a4e8052f32f4b751476f101d15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 9 Oct 2015 14:06:19 +0200 Subject: Don't use d_func in QWindow::mapToGlobal We initialize the variable d at the top using Q_D(const QWindow); Change-Id: I2de3b33c043024c5599b7cd1ebecae2db0b39d87 Reviewed-by: Christian Stromme --- src/gui/kernel/qwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index d4edc0fca1..628523e90f 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2295,7 +2295,7 @@ QPoint QWindow::mapToGlobal(const QPoint &pos) const && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) { return d->platformWindow->mapToGlobal(pos); } - return pos + d_func()->globalPosition(); + return pos + d->globalPosition(); } @@ -2315,7 +2315,7 @@ QPoint QWindow::mapFromGlobal(const QPoint &pos) const && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) { return d->platformWindow->mapFromGlobal(pos); } - return pos - d_func()->globalPosition(); + return pos - d->globalPosition(); } -- cgit v1.2.3 From 233d0a6b8d497fa7ef43c02b9bb551ac48454773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 8 Oct 2015 14:29:13 +0200 Subject: Add default argument to QPlatformWindow::isEmbedded() Removes magic 0-pointers at the call sites. Change-Id: I6740f6b8cc75004ab5f2ebcb3b3c95cbbdc43153 Reviewed-by: Lars Knoll --- src/gui/kernel/qguiapplication.cpp | 2 +- src/gui/kernel/qplatformwindow.h | 2 +- src/gui/kernel/qwindow.cpp | 4 ++-- src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- src/plugins/platforms/windows/qwindowswindow.h | 2 +- src/plugins/platforms/xcb/qxcbwindow.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 3f50ab8688..2e0595152b 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -870,7 +870,7 @@ QWindowList QGuiApplication::topLevelWindows() if (!list.at(i)->parent() && list.at(i)->type() != Qt::Desktop) { // Top windows of embedded QAxServers do not have QWindow parents, // but they are not true top level windows, so do not include them. - const bool embedded = list.at(i)->handle() && list.at(i)->handle()->isEmbedded(0); + const bool embedded = list.at(i)->handle() && list.at(i)->handle()->isEmbedded(); if (!embedded) topLevelWindows.prepend(list.at(i)); } diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index 9c2817906f..850e2b4bfe 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -95,7 +95,7 @@ public: virtual bool isExposed() const; virtual bool isActive() const; - virtual bool isEmbedded(const QPlatformWindow *parentWindow) const; + virtual bool isEmbedded(const QPlatformWindow *parentWindow = 0) const; virtual QPoint mapToGlobal(const QPoint &pos) const; virtual QPoint mapFromGlobal(const QPoint &pos) const; diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 628523e90f..f1c754c422 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2292,7 +2292,7 @@ QPoint QWindow::mapToGlobal(const QPoint &pos) const Q_D(const QWindow); // QTBUG-43252, prefer platform implementation for foreign windows. if (d->platformWindow - && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) { + && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded())) { return d->platformWindow->mapToGlobal(pos); } return pos + d->globalPosition(); @@ -2312,7 +2312,7 @@ QPoint QWindow::mapFromGlobal(const QPoint &pos) const Q_D(const QWindow); // QTBUG-43252, prefer platform implementation for foreign windows. if (d->platformWindow - && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded(0))) { + && (type() == Qt::ForeignWindow || d->platformWindow->isEmbedded())) { return d->platformWindow->mapFromGlobal(pos); } return pos - d->globalPosition(); diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index abfddcfed6..5cb34e7fd3 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1062,7 +1062,7 @@ QWindow *QWindowsWindow::topLevelOf(QWindow *w) if (const QPlatformWindow *handle = w->handle()) { const QWindowsWindow *ww = static_cast(handle); - if (ww->isEmbedded(0)) { + if (ww->isEmbedded()) { HWND parentHWND = GetAncestor(ww->handle(), GA_PARENT); const HWND desktopHwnd = GetDesktopWindow(); const QWindowsContext *ctx = QWindowsContext::instance(); @@ -1140,7 +1140,7 @@ bool QWindowsWindow::isEmbedded(const QPlatformWindow *parentWindow) const } if (!m_data.embedded && parent()) - return parent()->isEmbedded(0); + return parent()->isEmbedded(); return m_data.embedded; } diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h index d96022e3a5..c73c8ca8f3 100644 --- a/src/plugins/platforms/windows/qwindowswindow.h +++ b/src/plugins/platforms/windows/qwindowswindow.h @@ -152,7 +152,7 @@ public: bool isVisible() const; bool isExposed() const Q_DECL_OVERRIDE { return testFlag(Exposed); } bool isActive() const Q_DECL_OVERRIDE; - bool isEmbedded(const QPlatformWindow *parentWindow) const Q_DECL_OVERRIDE; + bool isEmbedded(const QPlatformWindow *parentWindow = 0) const Q_DECL_OVERRIDE; QPoint mapToGlobal(const QPoint &pos) const Q_DECL_OVERRIDE; QPoint mapFromGlobal(const QPoint &pos) const Q_DECL_OVERRIDE; diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 8968664bad..b2c5fa7d4d 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -81,7 +81,7 @@ public: void setParent(const QPlatformWindow *window) Q_DECL_OVERRIDE; bool isExposed() const Q_DECL_OVERRIDE; - bool isEmbedded(const QPlatformWindow *parentWindow) const Q_DECL_OVERRIDE; + bool isEmbedded(const QPlatformWindow *parentWindow = 0) const Q_DECL_OVERRIDE; QPoint mapToGlobal(const QPoint &pos) const Q_DECL_OVERRIDE; QPoint mapFromGlobal(const QPoint &pos) const Q_DECL_OVERRIDE; -- cgit v1.2.3 From bc00f3c2289f2962a99c61cf27002f2991efd8e3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 13 Oct 2015 17:09:33 +0200 Subject: fix the trailing-backslash-in-DESTDIR-on-mingw workaround at least the mingw version we use now interprets the sequence \# as a literal hashmark, which completely defeats the previous hack. the new hack escapes the backslash with another backslash, which appears to work. however, make does *not* remove the additional backslash, so the result is a bit ugly. Change-Id: I591a2be443880b162094d04e5a5e624216b59311 Reviewed-by: Simon Hausmann --- qmake/generators/unix/unixmake2.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index d0cd5d2354..9db64bebee 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -262,11 +262,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " " << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl; t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; - // The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes - // would be interpreted as line continuation. The lack of spacing between the value and the - // comment is also important as otherwise quoted use of "$(DESTDIR)" would include this - // spacing. - t << "DESTDIR = " << fileVar("DESTDIR") << "#avoid trailing-slash linebreak\n"; + QString destd = fileVar("DESTDIR"); + // When building on non-MSys MinGW, the path ends with a backslash, which + // GNU make will interpret that as a line continuation. Doubling the backslash + // avoids the problem, at the cost of the variable containing *both* backslashes. + if (destd.endsWith('\\')) + destd += '\\'; + t << "DESTDIR = " << destd << endl; t << "TARGET = " << fileVar("TARGET") << endl; // ### mixed use! if(project->isActiveConfig("plugin")) { t << "TARGETD = " << fileVar("TARGET") << endl; -- cgit v1.2.3 From 957fb9fb82f6852e4d94bdce27892598e00bc677 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 13:55:08 +0200 Subject: qt_pixmapFromWinHICON(): Fix crash and leak in case of Win32 API fails. Release the DC and move alpha-checking into separate function to prevent it from using invalid width/height. Task-number: QTBUG-48732 Change-Id: Iaf7cfa89b0f702f5012b0451d24a9e887d832c59 Reviewed-by: Oliver Wolff --- src/gui/image/qpixmap_win.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp index 12e19440dc..a7a9b375ff 100644 --- a/src/gui/image/qpixmap_win.cpp +++ b/src/gui/image/qpixmap_win.cpp @@ -345,9 +345,22 @@ static QImage qt_imageFromWinIconHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h) return image; } +static inline bool hasAlpha(const QImage &image) +{ + const int w = image.width(); + const int h = image.height(); + for (int y = 0; y < h; ++y) { + const QRgb *scanLine = reinterpret_cast(image.scanLine(y)); + for (int x = 0; x < w; ++x) { + if (qAlpha(scanLine[x]) != 0) + return true; + } + } + return false; +} + Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon) { - bool foundAlpha = false; HDC screenDevice = GetDC(0); HDC hdc = CreateCompatibleDC(screenDevice); ReleaseDC(0, screenDevice); @@ -356,6 +369,7 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon) const bool result = GetIconInfo(icon, &iconinfo); //x and y Hotspot describes the icon center if (!result) { qErrnoWarning("QPixmap::fromWinHICON(), failed to GetIconInfo()"); + DeleteDC(hdc); return QPixmap(); } @@ -371,17 +385,7 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon) DrawIconEx( hdc, 0, 0, icon, iconinfo.xHotspot * 2, iconinfo.yHotspot * 2, 0, 0, DI_NORMAL); QImage image = qt_imageFromWinIconHBITMAP(hdc, winBitmap, w, h); - for (int y = 0 ; y < h && !foundAlpha ; y++) { - const QRgb *scanLine= reinterpret_cast(image.scanLine(y)); - for (int x = 0; x < w ; x++) { - if (qAlpha(scanLine[x]) != 0) { - foundAlpha = true; - break; - } - } - } - if (!foundAlpha) { - //If no alpha was found, we use the mask to set alpha values + if (!image.isNull() && !hasAlpha(image)) { //If no alpha was found, we use the mask to set alpha values DrawIconEx( hdc, 0, 0, icon, w, h, 0, 0, DI_MASK); const QImage mask = qt_imageFromWinIconHBITMAP(hdc, winBitmap, w, h); -- cgit v1.2.3 From 4b9cdf90ca4299ffd4ec602571944ace10ef9cdc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 13 Oct 2015 19:30:03 +0200 Subject: fix bogus complaints about prl targets without extension in bundles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the library inside a bundle doesn't have an extension. this doesn't really fix anything except suppressing the error message, as we discard the result of the operation anyway. Change-Id: Idfe3d1714dedb59d9d3e86a65f074e516c431389 Reviewed-by: Tor Arne Vestbø --- qmake/generators/makefile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 6f844a5c4d..a54083c04d 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -915,7 +915,8 @@ MakefileGenerator::processPrlFile(QString &file) if (tgt.isEmpty()) { fprintf(stderr, "Error: %s does not define QMAKE_PRL_TARGET\n", meta_file.toLatin1().constData()); - } else if (!tgt.contains('.')) { + } else if (!tgt.contains('.') + && !libinfo.values("QMAKE_PRL_CONFIG").contains("lib_bundle")) { fprintf(stderr, "Error: %s defines QMAKE_PRL_TARGET without extension\n", meta_file.toLatin1().constData()); } else { -- cgit v1.2.3 From e9121328866efa6ba3eb78a991fef785338fd55e Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Mon, 13 Apr 2015 14:13:34 +0300 Subject: xcb: Use XShape for DnD when a compositing manager is not running Otherwise transparent areas of the drag'n'drop pixmap are painted with the black color. Task-number: QTBUG-45193 Change-Id: I55b7c7caababe13584fa1c7a52835f112e20f920 Reviewed-by: Lars Knoll --- src/gui/kernel/qshapedpixmapdndwindow.cpp | 13 ++++++-- src/gui/kernel/qshapedpixmapdndwindow_p.h | 2 ++ src/gui/kernel/qsimpledrag.cpp | 3 +- src/gui/kernel/qsimpledrag_p.h | 4 +++ src/plugins/platforms/xcb/qxcbclipboard.cpp | 24 ++------------- src/plugins/platforms/xcb/qxcbconnection.cpp | 45 ++++++++++++++++++++++++++-- src/plugins/platforms/xcb/qxcbconnection.h | 4 +++ src/plugins/platforms/xcb/qxcbdrag.cpp | 3 ++ src/plugins/platforms/xcb/qxcbscreen.cpp | 28 +++++++++++++++++ src/plugins/platforms/xcb/qxcbscreen.h | 8 +++++ 10 files changed, 106 insertions(+), 28 deletions(-) diff --git a/src/gui/kernel/qshapedpixmapdndwindow.cpp b/src/gui/kernel/qshapedpixmapdndwindow.cpp index 5736c41e25..d77b6dc262 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow.cpp +++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp @@ -35,12 +35,16 @@ #include #include +#include +#include +#include QT_BEGIN_NAMESPACE QShapedPixmapWindow::QShapedPixmapWindow(QScreen *screen) : QWindow(screen), - m_backingStore(0) + m_backingStore(0), + m_useCompositing(true) { QSurfaceFormat format; format.setAlphaBufferSize(8); @@ -68,7 +72,10 @@ void QShapedPixmapWindow::render() { QPainter p(device); - p.setCompositionMode(QPainter::CompositionMode_Source); + if (m_useCompositing) + p.setCompositionMode(QPainter::CompositionMode_Source); + else + p.fillRect(rect, QGuiApplication::palette().base()); p.drawPixmap(0, 0, m_pixmap); } @@ -79,6 +86,8 @@ void QShapedPixmapWindow::render() void QShapedPixmapWindow::setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; + if (!m_useCompositing) + setMask(m_pixmap.mask()); } void QShapedPixmapWindow::setHotspot(const QPoint &hotspot) diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h index 7536c09165..3d7974fa82 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow_p.h +++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h @@ -60,6 +60,7 @@ public: void render(); + void setUseCompositing(bool on) { m_useCompositing = on; } void setPixmap(const QPixmap &pixmap); void setHotspot(const QPoint &hotspot); @@ -72,6 +73,7 @@ private: QBackingStore *m_backingStore; QPixmap m_pixmap; QPoint m_hotSpot; + bool m_useCompositing; }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index 6acac4cade..9f38c9b78a 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -88,7 +88,7 @@ static QWindow* topLevelAt(const QPoint &pos) QBasicDrag::QBasicDrag() : m_restoreCursor(false), m_eventLoop(0), m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false), - m_drag(0), m_drag_icon_window(0) + m_drag(0), m_drag_icon_window(0), m_useCompositing(true) { } @@ -226,6 +226,7 @@ void QBasicDrag::recreateShapedPixmapWindow(QScreen *screen, const QPoint &pos) // when QDrag is used without a pixmap - QDrag::setPixmap() m_drag_icon_window = new QShapedPixmapWindow(screen); + m_drag_icon_window->setUseCompositing(m_useCompositing); m_drag_icon_window->setPixmap(m_drag->pixmap()); m_drag_icon_window->setHotspot(m_drag->hotSpot()); m_drag_icon_window->updateGeometry(pos); diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h index 4c9edbae05..055136c436 100644 --- a/src/gui/kernel/qsimpledrag_p.h +++ b/src/gui/kernel/qsimpledrag_p.h @@ -87,6 +87,9 @@ protected: bool canDrop() const { return m_can_drop; } void setCanDrop(bool c) { m_can_drop = c; } + bool useCompositing() const { return m_useCompositing; } + void setUseCompositing(bool on) { m_useCompositing = on; } + Qt::DropAction executedDropAction() const { return m_executed_drop_action; } void setExecutedDropAction(Qt::DropAction da) { m_executed_drop_action = da; } @@ -104,6 +107,7 @@ private: bool m_can_drop; QDrag *m_drag; QShapedPixmapWindow *m_drag_icon_window; + bool m_useCompositing; }; class Q_GUI_EXPORT QSimpleDrag : public QBasicDrag diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp index 248d1b4bbb..8b75c130fb 100644 --- a/src/plugins/platforms/xcb/qxcbclipboard.cpp +++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp @@ -275,22 +275,8 @@ QXcbClipboard::QXcbClipboard(QXcbConnection *c) m_clientClipboard[QClipboard::Selection] = 0; m_timestamp[QClipboard::Clipboard] = XCB_CURRENT_TIME; m_timestamp[QClipboard::Selection] = XCB_CURRENT_TIME; + m_owner = connection()->getQtSelectionOwner(); - QXcbScreen *platformScreen = screen(); - - int x = 0, y = 0, w = 3, h = 3; - - m_owner = xcb_generate_id(xcb_connection()); - Q_XCB_CALL(xcb_create_window(xcb_connection(), - XCB_COPY_FROM_PARENT, // depth -- same as root - m_owner, // window id - platformScreen->screen()->root, // parent window id - x, y, w, h, - 0, // border width - XCB_WINDOW_CLASS_INPUT_OUTPUT, // window class - platformScreen->screen()->root_visual, // visual - 0, // value mask - 0)); // value list #ifndef QT_NO_DEBUG QByteArray ba("Qt clipboard window"); Q_XCB_CALL(xcb_change_property(xcb_connection(), @@ -353,13 +339,7 @@ void QXcbClipboard::incrTransactionPeeker(xcb_generic_event_t *ge, bool &accepte xcb_window_t QXcbClipboard::getSelectionOwner(xcb_atom_t atom) const { - xcb_connection_t *c = xcb_connection(); - xcb_get_selection_owner_cookie_t cookie = xcb_get_selection_owner(c, atom); - xcb_get_selection_owner_reply_t *reply; - reply = xcb_get_selection_owner_reply(c, cookie, 0); - xcb_window_t win = reply->owner; - free(reply); - return win; + return connection()->getSelectionOwner(atom); } xcb_atom_t QXcbClipboard::atomForMode(QClipboard::Mode mode) const diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 13d73c7194..a20d957138 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -449,6 +449,9 @@ void QXcbConnection::initializeScreens() ++xcbScreenNumber; } // for each xcb screen + foreach (QXcbVirtualDesktop *virtualDesktop, m_virtualDesktops) + virtualDesktop->subscribeToXFixesSelectionNotify(); + // If there's no randr extension, or there was some error above, or we found a // screen which doesn't have outputs for some other reason (e.g. on VNC or ssh -X), // but the dimensions are known anyway, and we don't already have any lingering @@ -507,6 +510,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra , m_systemTrayTracker(0) , m_glIntegration(Q_NULLPTR) , m_xiGrab(false) + , m_qtSelectionOwner(0) { #ifdef XCB_USE_XLIB Display *dpy = XOpenDisplay(m_displayName.constData()); @@ -551,12 +555,12 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra m_netWmUserTime = XCB_CURRENT_TIME; initializeXRandr(); + initializeXFixes(); initializeScreens(); if (m_screens.isEmpty()) qFatal("QXcbConnection: no screens available"); - initializeXFixes(); initializeXRender(); m_xi2Enabled = false; #if defined(XCB_USE_XINPUT2) @@ -1139,10 +1143,14 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) if (!handled) { if (response_type == xfixes_first_event + XCB_XFIXES_SELECTION_NOTIFY) { - setTime(((xcb_xfixes_selection_notify_event_t *)event)->timestamp); + xcb_xfixes_selection_notify_event_t *notify_event = (xcb_xfixes_selection_notify_event_t *)event; + setTime(notify_event->timestamp); #ifndef QT_NO_CLIPBOARD - m_clipboard->handleXFixesSelectionRequest((xcb_xfixes_selection_notify_event_t *)event); + m_clipboard->handleXFixesSelectionRequest(notify_event); #endif + foreach (QXcbVirtualDesktop *virtualDesktop, m_virtualDesktops) + virtualDesktop->handleXFixesSelectionNotify(notify_event); + handled = true; } else if (has_randr_extension && response_type == xrandr_first_event + XCB_RANDR_NOTIFY) { updateScreens((xcb_randr_notify_event_t *)event); @@ -1371,6 +1379,37 @@ xcb_timestamp_t QXcbConnection::getTimestamp() return timestamp; } +xcb_window_t QXcbConnection::getSelectionOwner(xcb_atom_t atom) const +{ + xcb_connection_t *c = xcb_connection(); + xcb_get_selection_owner_cookie_t cookie = xcb_get_selection_owner(c, atom); + xcb_get_selection_owner_reply_t *reply; + reply = xcb_get_selection_owner_reply(c, cookie, 0); + xcb_window_t win = reply->owner; + free(reply); + return win; +} + +xcb_window_t QXcbConnection::getQtSelectionOwner() +{ + if (!m_qtSelectionOwner) { + xcb_screen_t *xcbScreen = primaryVirtualDesktop()->screen(); + int x = 0, y = 0, w = 3, h = 3; + m_qtSelectionOwner = xcb_generate_id(xcb_connection()); + Q_XCB_CALL(xcb_create_window(xcb_connection(), + XCB_COPY_FROM_PARENT, // depth -- same as root + m_qtSelectionOwner, // window id + xcbScreen->root, // parent window id + x, y, w, h, + 0, // border width + XCB_WINDOW_CLASS_INPUT_OUTPUT, // window class + xcbScreen->root_visual, // visual + 0, // value mask + 0)); // value list + } + return m_qtSelectionOwner; +} + xcb_window_t QXcbConnection::rootWindow() { QXcbScreen *s = primaryScreen(); diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index fb5b941fff..3c82170679 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -460,6 +460,8 @@ public: bool threadedEventHandling() const { return m_reader->isRunning(); } xcb_timestamp_t getTimestamp(); + xcb_window_t getSelectionOwner(xcb_atom_t atom) const; + xcb_window_t getQtSelectionOwner(); void setButton(Qt::MouseButton button, bool down) { if (down) m_buttons |= button; else m_buttons &= ~button; } Qt::MouseButtons buttons() const { return m_buttons; } @@ -650,6 +652,8 @@ private: QXcbGlIntegration *m_glIntegration; bool m_xiGrab; + xcb_window_t m_qtSelectionOwner; + friend class QXcbEventReader; }; diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index f9c3aa7fed..d19ea241f1 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -191,6 +191,8 @@ void QXcbDrag::startDrag() xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, connection()->clipboard()->owner(), atom(QXcbAtom::XdndTypelist), XCB_ATOM_ATOM, 32, drag_types.size(), (const void *)drag_types.constData()); + + setUseCompositing(current_virtual_desktop->compositingActive()); QBasicDrag::startDrag(); } @@ -316,6 +318,7 @@ void QXcbDrag::move(const QPoint &globalPos) QPoint deviceIndependentPos = QHighDpiScaling::mapPositionFromNative(globalPos, screen); if (virtualDesktop != current_virtual_desktop) { + setUseCompositing(virtualDesktop->compositingActive()); recreateShapedPixmapWindow(static_cast(screen)->screen(), deviceIndependentPos); current_virtual_desktop = virtualDesktop; } else { diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index 64645b92f6..0aa5810a72 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -54,6 +54,10 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t , m_number(number) , m_xSettings(Q_NULLPTR) { + QByteArray cmAtomName("_NET_WM_CM_S"); + cmAtomName += QByteArray::number(m_number); + m_net_wm_cm_atom = connection->internAtom(cmAtomName.constData()); + m_compositingActive = connection->getSelectionOwner(m_net_wm_cm_atom); } QXcbVirtualDesktop::~QXcbVirtualDesktop() @@ -79,6 +83,30 @@ QXcbXSettings *QXcbVirtualDesktop::xSettings() const return m_xSettings; } +bool QXcbVirtualDesktop::compositingActive() const +{ + if (connection()->hasXFixes()) + return m_compositingActive; + else + return connection()->getSelectionOwner(m_net_wm_cm_atom); +} + +void QXcbVirtualDesktop::handleXFixesSelectionNotify(xcb_xfixes_selection_notify_event_t *notify_event) +{ + if (notify_event->selection == m_net_wm_cm_atom) + m_compositingActive = notify_event->owner; +} + +void QXcbVirtualDesktop::subscribeToXFixesSelectionNotify() +{ + if (connection()->hasXFixes()) { + const uint32_t mask = XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER | + XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY | + XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE; + Q_XCB_CALL(xcb_xfixes_select_selection_input_checked(xcb_connection(), connection()->getQtSelectionOwner(), m_net_wm_cm_atom, mask)); + } +} + QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop, xcb_randr_output_t outputId, xcb_randr_get_output_info_reply_t *output, QString outputName) diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index d8d63608e7..51c92a40ae 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -39,6 +39,7 @@ #include #include +#include #include "qxcbobject.h" #include "qxcbscreen.h" @@ -69,11 +70,18 @@ public: QXcbXSettings *xSettings() const; + bool compositingActive() const; + + void handleXFixesSelectionNotify(xcb_xfixes_selection_notify_event_t *notify_event); + void subscribeToXFixesSelectionNotify(); + private: xcb_screen_t *m_screen; int m_number; QXcbXSettings *m_xSettings; + xcb_atom_t m_net_wm_cm_atom; + bool m_compositingActive; }; class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen -- cgit v1.2.3 From 2d2cb6434f1d6e00f421c98b20467ff3f4388319 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 17 Sep 2015 18:17:40 -0700 Subject: Move the official Qt version from qglobal.h to .qmake.conf It's easier to parse than qglobal.h. The objective is actually to have macros with parts of the version number, so the major or minor numbers could be used in other preprocessor macros. Change-Id: I42e7ef1a481840699a8dffff1404eda1dd5c308d Reviewed-by: Oswald Buddenhagen --- .qmake.conf | 3 +-- bin/syncqt.pl | 8 +------- configure | 37 +++++++++++++++++++++---------------- configure.bat | 20 ++++++++++++++++++-- qmake/Makefile.unix | 1 + qmake/Makefile.win32 | 1 + src/corelib/global/qglobal.h | 4 ++-- tools/configure/Makefile.mingw | 2 +- tools/configure/Makefile.win32 | 2 +- tools/configure/configureapp.cpp | 37 ++++++++++++++++++++++--------------- 10 files changed, 69 insertions(+), 46 deletions(-) diff --git a/.qmake.conf b/.qmake.conf index 481544b253..732b5da262 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,5 +5,4 @@ CONFIG += warning_clean QT_SOURCE_TREE = $$PWD QT_BUILD_TREE = $$shadowed($$PWD) -# In qtbase, all modules follow qglobal.h -MODULE_VERSION = $$QT_VERSION +MODULE_VERSION = 5.6.0 diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 13cf78a4ab..c682cf318a 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -786,6 +786,7 @@ while ( @ARGV ) { # if we have no $basedir we cannot be sure which sources you want, so die die "Could not find any sync.profile for your module!\nPass to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); +die "The -version argument is mandatory" if (!$module_version); our @ignore_headers = (); our @ignore_for_master_contents = (); @@ -803,13 +804,6 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate; $isunix = checkUnix; #cache checkUnix -if (!$module_version) { - my $filco = fileContents($basedir."/src/corelib/global/qglobal.h"); - if ($filco !~ m,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,sm) { - die "Cannot determine Qt/Module version. Use -version.\n"; - } - $module_version = $1; -} foreach my $lib (@modules_to_sync) { die "No such module: $lib" unless(defined $modules{$lib}); diff --git a/configure b/configure index 996990706b..a3e951df9f 100755 --- a/configure +++ b/configure @@ -539,23 +539,16 @@ fi #----------------------------------------------------------------------------- # Qt version detection #----------------------------------------------------------------------------- -QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h` +QT_VERSION= QT_MAJOR_VERSION= QT_MINOR_VERSION=0 QT_PATCH_VERSION=0 -if [ -n "$QT_VERSION" ]; then - QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'` - MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'` - if [ -n "$MAJOR" ]; then - MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'` - PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'` - QT_MAJOR_VERSION="$MAJOR" - [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR" - [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH" - fi -fi +eval `sed -n -e 's/^MODULE_VERSION = \(\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*\)$/QT_VERSION=\1\ + QT_MAJOR_VERSION=\2\ + QT_MINOR_VERSION=\3\ + QT_PATCH_VERSION=\4/p' < "$relpath"/.qmake.conf` if [ -z "$QT_MAJOR_VERSION" ]; then - echo "Cannot process version from qglobal.h: $QT_VERSION" + echo "Cannot process version from .qmake.conf" echo "Cannot proceed." exit 1 fi @@ -3952,7 +3945,7 @@ if [ -e "$relpath/.git" ]; then exit 1 fi - "$relpath/bin/syncqt.pl" -minimal -module QtCore "$relpath" || exit 1 + "$relpath/bin/syncqt.pl" -version $QT_VERSION -minimal -module QtCore "$relpath" || exit 1 fi # $1: input variable name (awk regexp) @@ -4094,6 +4087,9 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; fi echo "QMAKESPEC = $adjqmakespec" >> "$mkfile" echo "QT_VERSION = $QT_VERSION" >> "$mkfile" + echo "QT_MAJOR_VERSION = $QT_MAJOR_VERSION" >> "$mkfile" + echo "QT_MINOR_VERSION = $QT_MINOR_VERSION" >> "$mkfile" + echo "QT_PATCH_VERSION = $QT_PATCH_VERSION" >> "$mkfile" echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile" echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile" echo "QTOBJS =" $EXTRA_OBJS >> "$mkfile" @@ -6690,13 +6686,22 @@ echo "Done running configuration tests." # part of configuration information goes into qconfig.h #------------------------------------------------------------------------------- +# start with Qt's version number +cat > "$outpath/src/corelib/global/qconfig.h.new" <"$outpath/src/corelib/global/qconfig.h.new" + echo "/* Everything */" >>"$outpath/src/corelib/global/qconfig.h.new" ;; *) tmpconfig="$outpath/src/corelib/global/qconfig.h.new" - echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig" + echo "#ifndef QT_BOOTSTRAPPED" >>"$tmpconfig" cat "$CFG_QCONFIG_PATH" >>"$tmpconfig" echo "#endif" >>"$tmpconfig" ;; diff --git a/configure.bat b/configure.bat index 1220bfedc2..47acf26d62 100644 --- a/configure.bat +++ b/configure.bat @@ -34,6 +34,7 @@ @echo off set QTSRC=%~dp0 set QTDIR=%CD% + if not exist %QTSRC%.gitignore goto sconf echo Please wait while bootstrapping configure ... @@ -47,7 +48,18 @@ if not exist mkspecs ( md mkspecs if errorlevel 1 goto exit ) -perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir "%QTDIR%" %QTSRC% + +rem Extract Qt's version from .qmake.conf +for /f "eol=# tokens=1,2,3,4 delims=.= " %%i in (%QTSRC%.qmake.conf) do ( + if %%i == MODULE_VERSION ( + set QTVERMAJ=%%j + set QTVERMIN=%%k + set QTVERPAT=%%l + ) +) +set QTVERSION=%QTVERMAJ%.%QTVERMIN%.%QTVERPAT% + +perl %QTSRC%bin\syncqt.pl -minimal -version %QTVERSION% -module QtCore -outdir "%QTDIR%" %QTSRC% if errorlevel 1 goto exit if not exist tools\configure ( @@ -62,7 +74,11 @@ if not "%jom.exe%" == "" set make=jom echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile echo/>> Makefile -for /f "tokens=3 usebackq" %%V in (`findstr QT_VERSION_STR %QTSRC%src\corelib\global\qglobal.h`) do @echo QTVERSION = %%~V>> Makefile +echo QTVERSION = %QTVERSION%>> Makefile +rem These must have trailing spaces to avoid misinterpretation as 5>>, etc. +echo QT_VERSION_MAJOR = %QTVERMAJ% >> Makefile +echo QT_VERSION_MINOR = %QTVERMIN% >> Makefile +echo QT_VERSION_PATCH = %QTVERPAT% >> Makefile if not "%icl.exe%" == "" ( echo CXX = icl>>Makefile echo EXTRA_CXXFLAGS = /Zc:forScope>>Makefile diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 520ae667e9..405bbf9212 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -102,6 +102,7 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ -I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \ -I$(QMAKESPEC) \ -I$(SOURCE_PATH)/tools/shared \ + -DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \ -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 272a0c09b1..c673899f18 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -36,6 +36,7 @@ CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \ -I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \ -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \ -I$(SOURCE_PATH)\tools\shared \ + -DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \ -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 4813c2b100..81ab3bcb9e 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -41,11 +41,10 @@ #include -#define QT_VERSION_STR "5.6.0" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x050600 +#define QT_VERSION QT_VERSION_CHECK(QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH) /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ @@ -55,6 +54,7 @@ #include #include #endif + #ifdef _MSC_VER # define QT_SUPPORTS(FEATURE) (!defined QT_NO_##FEATURE) #else diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw index f4513c64d6..5bdfc3f32c 100644 --- a/tools/configure/Makefile.mingw +++ b/tools/configure/Makefile.mingw @@ -4,7 +4,7 @@ CONFSRC = $(TOOLSRC)/configure RAW_PCH = configure_pch.h PCH = $(RAW_PCH).gch/c++ -DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE +DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++" CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH) CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE) diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index da5b430bb1..d3a28e73ab 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -3,7 +3,7 @@ TOOLSRC = $(QTSRC)tools CONFSRC = $(TOOLSRC)\configure PCH = configure_pch.pch -DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE +DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008" CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d4ea0f6d04..62af1970fe 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -198,20 +198,18 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg"; QString version; - QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h"); - if (qglobal_h.open(QFile::ReadOnly)) { - QTextStream read(&qglobal_h); - QRegExp version_regexp("^# *define *QT_VERSION_STR *\"([^\"]*)\""); - QString line; - while (!read.atEnd()) { - line = read.readLine(); - if (version_regexp.exactMatch(line)) { - version = version_regexp.cap(1).trimmed(); - if (!version.isEmpty()) - break; - } + QFile qmake_conf(sourcePath + "/.qmake.conf"); + if (qmake_conf.open(QFile::ReadOnly)) { + while (!qmake_conf.atEnd()) { + static const char beginning[] = "MODULE_VERSION = "; + QByteArray line = qmake_conf.readLine(); + if (!line.startsWith(beginning)) + continue; + + version = qMove(line).mid(int(strlen(beginning))).trimmed(); + break; } - qglobal_h.close(); + qmake_conf.close(); } if (version.isEmpty()) @@ -3632,6 +3630,12 @@ void Configure::generateConfigfiles() { FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig.h"); + tmpStream << "#define QT_VERSION_MAJOR " << dictionary["VERSION_MAJOR"] << endl + << "#define QT_VERSION_MINOR " << dictionary["VERSION_MINOR"] << endl + << "#define QT_VERSION_PATCH " << dictionary["VERSION_PATCH"] << endl + << "#define QT_VERSION_STR \"" << dictionary["VERSION"] << "\"\n" + << endl; + if (dictionary[ "QCONFIG" ] == "full") { tmpStream << "/* Everything */" << endl; } else { @@ -4031,7 +4035,7 @@ void Configure::generateHeaders() QStringList args; args << "perl" << "-w"; args += sourcePath + "/bin/syncqt.pl"; - args << "-minimal" << "-module" << "QtCore"; + args << "-version" << dictionary["VERSION"] << "-minimal" << "-module" << "QtCore"; args += sourcePath; int retc = Environment::execute(args, QStringList(), QStringList()); if (retc) { @@ -4294,7 +4298,10 @@ void Configure::buildQmake() << "INC_PATH = " << QDir::toNativeSeparators( (QFile::exists(sourcePath + "/.git") ? ".." : sourcePath) + "/include") << endl; - stream << "QT_VERSION = " << dictionary["VERSION"] << endl; + stream << "QT_VERSION = " << dictionary["VERSION"] << endl + << "QT_MAJOR_VERSION = " << dictionary["VERSION_MAJOR"] << endl + << "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl + << "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl; if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl << "EXTRA_CFLAGS = -DUNICODE -ffunction-sections" << endl -- cgit v1.2.3 From 6951f0e4afb03870f069465f8016e76e4ef1ba41 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 12 Oct 2015 13:38:32 +0200 Subject: QCompleter::splitPath(): don't get tangled up in strings - Don't store "\\" as a QString just for passing it to QString:.startsWith() and prepend(). Keep it a QLatin1String. -> one allocation less - Don't use said QString as a flag, use a bool - Don't store QDir::separator() in a QString -> one allocation less -> two indexing operations less - Don't retrieve QDir::separator() from said QString as QString(sep[0]) -> one more allocation less - Don't look for a QChar in a string by using QRegExp; use the QChar overload instead -> one more allocation (at _least_) less - Don't convert QDir::separator() with QDir::fromNativeSeparators(); it will _always_ be '/'... -> one expensive function call less -> two QString allocations less -> one QString(QChar) introduced -> one allocation more -> could be removed with QStringLiteral/QString::fromLatin1Char() Change-Id: I802e66685a95b08cfc557defc63e5f16a7e6306b Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/util/qcompleter.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 559f024e5f..ba56f004b7 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -1820,26 +1820,23 @@ QStringList QCompleter::splitPath(const QString& path) const return QStringList(completionPrefix()); QString pathCopy = QDir::toNativeSeparators(path); - QString sep = QDir::separator(); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\")) return QStringList(pathCopy); - QString doubleSlash(QLatin1String("\\\\")); - if (pathCopy.startsWith(doubleSlash)) + const bool startsWithDoubleSlash = pathCopy.startsWith(QLatin1String("\\\\")); + if (startsWithDoubleSlash) pathCopy = pathCopy.mid(2); - else - doubleSlash.clear(); #endif - QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']')); - QStringList parts = pathCopy.split(re); + const QChar sep = QDir::separator(); + QStringList parts = pathCopy.split(sep); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - if (!doubleSlash.isEmpty()) - parts[0].prepend(doubleSlash); + if (startsWithDoubleSlash) + parts[0].prepend(QLatin1String("\\\\")); #else - if (pathCopy[0] == sep[0]) // readd the "/" at the beginning as the split removed it - parts[0] = QDir::fromNativeSeparators(QString(sep[0])); + if (pathCopy[0] == sep) // readd the "/" at the beginning as the split removed it + parts[0] = QLatin1Char('/'); #endif return parts; -- cgit v1.2.3 From 6f34660340421670c44d726249af3dd2f0be04fa Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 6 Oct 2015 15:47:48 +0200 Subject: QStateMachine: fix leak of delayed events. When a delayed event is queued, the state-machine is responsible for deleting it. Normal flow will ensure that: after the timer fires, the delayed event is handled normally, which includes deletion. However, when a timer cannot be set, the event was leaked. But more important: if there were unhandled (delayed) events when the state-machine was destoryed, the events were never deleted. Change-Id: I7d8a6b572765dc1551ddbdebb446aaa3258680c8 Reviewed-by: Simon Hausmann --- src/corelib/statemachine/qstatemachine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 3ffe191093..31b079af0c 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -406,6 +406,10 @@ QStateMachinePrivate::~QStateMachinePrivate() { qDeleteAll(internalEventQueue); qDeleteAll(externalEventQueue); + + for (QHash::const_iterator it = delayedEvents.begin(), eit = delayedEvents.end(); it != eit; ++it) { + delete it.value().event; + } } QState *QStateMachinePrivate::rootState() const @@ -1944,6 +1948,7 @@ void QStateMachinePrivate::_q_startDelayedEventTimer(int id, int delay) e.timerId = q->startTimer(delay); if (!e.timerId) { qWarning("QStateMachine::postDelayedEvent: failed to start timer (id=%d, delay=%d)", id, delay); + delete e.event; delayedEvents.erase(it); delayedEventIdFreeList.release(id); } else { -- cgit v1.2.3 From 61be975574bff3e8f34d55df5131284a0134f7b4 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 6 Oct 2015 16:13:31 +0200 Subject: QStateMachine: cleanup QAbstractTransition::setTargetStates Prevent QPointer creation for every new target, and a copy of a QVector of QPointer, and two QPointer destructions, when setting new target states. The typical (only?) use-case, setting the target states right after transition creation, is also faster. Change-Id: I931783afbcea43c8a84200133f26454a4b689edc Reviewed-by: Simon Hausmann --- src/corelib/statemachine/qabstracttransition.cpp | 51 +++++++++++++++++++----- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index 5a7a95883b..56f2a15fdb 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -252,26 +252,55 @@ QList QAbstractTransition::targetStates() const void QAbstractTransition::setTargetStates(const QList &targets) { Q_D(QAbstractTransition); - QVector > copy(d->targetStates); - bool sameList = true; + + // Verify if any of the new target states is a null-pointer: for (int i = 0; i < targets.size(); ++i) { - QAbstractState *target = targets.at(i); - if (!target) { + if (targets.at(i) == Q_NULLPTR) { qWarning("QAbstractTransition::setTargetStates: target state(s) cannot be null"); return; + } + } + + // First clean out any target states that got destroyed, but for which we still have a QPointer + // around. + for (int i = 0; i < d->targetStates.size(); ) { + if (d->targetStates.at(i).isNull()) { + d->targetStates.remove(i); } else { - sameList &= copy.removeOne(target); + ++i; + } + } + + // Easy check: if both lists are empty, we're done. + if (targets.isEmpty() && d->targetStates.isEmpty()) + return; + + bool sameList = true; + + if (targets.size() != d->targetStates.size()) { + // If the sizes of the lists are different, we don't need to be smart: they're different. So + // we can just set the new list as the targetStates. + sameList = false; + } else { + QVector > copy(d->targetStates); + for (int i = 0; i < targets.size(); ++i) { + sameList &= copy.removeOne(targets.at(i)); + if (!sameList) + break; // ok, we now know the lists are not the same, so stop the loop. } + + sameList &= copy.isEmpty(); } - sameList &= copy.isEmpty(); + if (sameList) + return; - d->targetStates.clear(); - for (int i = 0; i < targets.size(); ++i) - d->targetStates.append(targets.at(i)); + d->targetStates.resize(targets.size()); + for (int i = 0; i < targets.size(); ++i) { + d->targetStates[i] = targets.at(i); + } - if (!sameList) - emit targetStatesChanged(QPrivateSignal()); + emit targetStatesChanged(QPrivateSignal()); } /*! -- cgit v1.2.3 From 361a4c1994380b5eaf885407aa2137db2608c6e6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 14 Oct 2015 19:29:24 +0200 Subject: uic: updates from running generate_ui (as of qttools:9ed1cfb27d7354cbc1020563569b8f65a3311303) Change-Id: I2f539d2a20428cf167c04ea9f5881b1f5d58beb0 Reviewed-by: Friedemann Kleint --- src/tools/uic/ui4.cpp | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/tools/uic/ui4.h | 40 +++++++++++++++++++++++- 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp index d765368367..6779dbf9e7 100644 --- a/src/tools/uic/ui4.cpp +++ b/src/tools/uic/ui4.cpp @@ -8776,6 +8776,8 @@ void DomSlots::setElementSlot(const QStringList& a) void DomPropertySpecifications::clear(bool clear_all) { + qDeleteAll(m_tooltip); + m_tooltip.clear(); qDeleteAll(m_stringpropertyspecification); m_stringpropertyspecification.clear(); @@ -8793,6 +8795,8 @@ DomPropertySpecifications::DomPropertySpecifications() DomPropertySpecifications::~DomPropertySpecifications() { + qDeleteAll(m_tooltip); + m_tooltip.clear(); qDeleteAll(m_stringpropertyspecification); m_stringpropertyspecification.clear(); } @@ -8804,6 +8808,12 @@ void DomPropertySpecifications::read(QXmlStreamReader &reader) switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); + if (tag == QLatin1String("tooltip")) { + DomPropertyToolTip *v = new DomPropertyToolTip(); + v->read(reader); + m_tooltip.append(v); + continue; + } if (tag == QLatin1String("stringpropertyspecification")) { DomStringPropertySpecification *v = new DomStringPropertySpecification(); v->read(reader); @@ -8830,6 +8840,10 @@ void DomPropertySpecifications::write(QXmlStreamWriter &writer, const QString &t { writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("propertyspecifications") : tagName.toLower()); + for (int i = 0; i < m_tooltip.size(); ++i) { + DomPropertyToolTip* v = m_tooltip[i]; + v->write(writer, QStringLiteral("tooltip")); + } for (int i = 0; i < m_stringpropertyspecification.size(); ++i) { DomStringPropertySpecification* v = m_stringpropertyspecification[i]; v->write(writer, QStringLiteral("stringpropertyspecification")); @@ -8840,12 +8854,84 @@ void DomPropertySpecifications::write(QXmlStreamWriter &writer, const QString &t writer.writeEndElement(); } +void DomPropertySpecifications::setElementTooltip(const QList& a) +{ + m_children |= Tooltip; + m_tooltip = a; +} + void DomPropertySpecifications::setElementStringpropertyspecification(const QList& a) { m_children |= Stringpropertyspecification; m_stringpropertyspecification = a; } +void DomPropertyToolTip::clear(bool clear_all) +{ + + if (clear_all) { + m_text.clear(); + m_has_attr_name = false; + } + + m_children = 0; +} + +DomPropertyToolTip::DomPropertyToolTip() +{ + m_children = 0; + m_has_attr_name = false; +} + +DomPropertyToolTip::~DomPropertyToolTip() +{ +} + +void DomPropertyToolTip::read(QXmlStreamReader &reader) +{ + + foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { + QStringRef name = attribute.name(); + if (name == QLatin1String("name")) { + setAttributeName(attribute.value().toString()); + continue; + } + reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + } + + for (bool finished = false; !finished && !reader.hasError();) { + switch (reader.readNext()) { + case QXmlStreamReader::StartElement : { + const QString tag = reader.name().toString().toLower(); + reader.raiseError(QStringLiteral("Unexpected element ") + tag); + } + break; + case QXmlStreamReader::EndElement : + finished = true; + break; + case QXmlStreamReader::Characters : + if (!reader.isWhitespace()) + m_text.append(reader.text().toString()); + break; + default : + break; + } + } +} + +void DomPropertyToolTip::write(QXmlStreamWriter &writer, const QString &tagName) const +{ + writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("propertytooltip") : tagName.toLower()); + + if (hasAttributeName()) + writer.writeAttribute(QStringLiteral("name"), attributeName()); + + if (!m_text.isEmpty()) + writer.writeCharacters(m_text); + + writer.writeEndElement(); +} + void DomStringPropertySpecification::clear(bool clear_all) { diff --git a/src/tools/uic/ui4.h b/src/tools/uic/ui4.h index 60685c9111..1e5bcbf0ab 100644 --- a/src/tools/uic/ui4.h +++ b/src/tools/uic/ui4.h @@ -144,6 +144,7 @@ class DomWidgetData; class DomDesignerData; class DomSlots; class DomPropertySpecifications; +class DomPropertyToolTip; class DomStringPropertySpecification; /******************************************************************************* @@ -3541,6 +3542,9 @@ public: // attribute accessors // child element accessors + inline QList elementTooltip() const { return m_tooltip; } + void setElementTooltip(const QList& a); + inline QList elementStringpropertyspecification() const { return m_stringpropertyspecification; } void setElementStringpropertyspecification(const QList& a); @@ -3551,15 +3555,49 @@ private: // attribute data // child element data uint m_children; + QList m_tooltip; QList m_stringpropertyspecification; enum Child { - Stringpropertyspecification = 1 + Tooltip = 1, + Stringpropertyspecification = 2 }; DomPropertySpecifications(const DomPropertySpecifications &other); void operator = (const DomPropertySpecifications&other); }; +class QDESIGNER_UILIB_EXPORT DomPropertyToolTip { +public: + DomPropertyToolTip(); + ~DomPropertyToolTip(); + + void read(QXmlStreamReader &reader); + void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; + inline QString text() const { return m_text; } + inline void setText(const QString &s) { m_text = s; } + + // attribute accessors + inline bool hasAttributeName() const { return m_has_attr_name; } + inline QString attributeName() const { return m_attr_name; } + inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void clearAttributeName() { m_has_attr_name = false; } + + // child element accessors +private: + QString m_text; + void clear(bool clear_all = true); + + // attribute data + QString m_attr_name; + bool m_has_attr_name; + + // child element data + uint m_children; + + DomPropertyToolTip(const DomPropertyToolTip &other); + void operator = (const DomPropertyToolTip&other); +}; + class QDESIGNER_UILIB_EXPORT DomStringPropertySpecification { public: DomStringPropertySpecification(); -- cgit v1.2.3 From 0a00782608c7dcc15f58f514bb75bbf0d646abed Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 3 Sep 2015 14:28:18 +0200 Subject: QShortcutMap: enable extra debugging when Dump_QShortcutMap is defined Dump_QShortcutMap is already made available in qshortcutmap_p.h, and if set, "void dumpMap() const;" will be available to help debugging. But unless QDebug &operator<< in qshortcutmap.cpp is also defined, the dumpMap output will be pretty useless. Change-Id: If8d535998ec01686eca25da73c2220062820a927 Reviewed-by: Frederik Gladhorn --- src/gui/kernel/qshortcutmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp index 3b2e6ffd29..9c8218b7b5 100644 --- a/src/gui/kernel/qshortcutmap.cpp +++ b/src/gui/kernel/qshortcutmap.cpp @@ -84,7 +84,7 @@ struct QShortcutEntry QShortcutMap::ContextMatcher contextMatcher; }; -#if 0 //ndef QT_NO_DEBUG_STREAM +#ifdef Dump_QShortcutMap /*! \internal QDebug operator<< for easy debug output of the shortcut entries. */ @@ -99,7 +99,7 @@ static QDebug &operator<<(QDebug &dbg, const QShortcutEntry *se) << "), owner(" << se->owner << ')'; return dbg; } -#endif // QT_NO_DEBUGSTREAM +#endif // Dump_QShortcutMap /* \internal Private data for QShortcutMap -- cgit v1.2.3 From 4f7e0bdc4c18b8d0a1e317ddae2d2caa80b59c8e Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Fri, 28 Aug 2015 19:00:21 +0300 Subject: Android: Ensure all global objects are destructed Android doesn't automatically trigger global objects destruction, so we need to do it ourselves. Test case: struct TestGlobal { ~TestGlobal() { qDebug() << " ~TestGlobal";} } global; int main() { return 0; } Change-Id: I32507c1cffebafc9841e9707a8f6711dcbd36281 Reviewed-by: Christian Stromme --- src/plugins/platforms/android/androidjnimain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp index c7c82e255c..99cb58830c 100644 --- a/src/plugins/platforms/android/androidjnimain.cpp +++ b/src/plugins/platforms/android/androidjnimain.cpp @@ -432,7 +432,6 @@ static void *startMainMethod(void */*data*/) params[i] = static_cast(m_applicationParams[i].constData()); int ret = m_main(m_applicationParams.length(), const_cast(params.data())); - Q_UNUSED(ret); if (m_mainLibraryHnd) { int res = dlclose(m_mainLibraryHnd); @@ -448,6 +447,8 @@ static void *startMainMethod(void */*data*/) if (vm != 0) vm->DetachCurrentThread(); + // We must call exit() to ensure that all global objects will be destructed + exit(ret); return 0; } -- cgit v1.2.3 From 3674718e3d7a030a774d53630888e424139df79b Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 15 Oct 2015 08:41:09 +0300 Subject: Dispatch all key and all generic motion events java objects to QtCore These events are needed to enable the usage of all input methods available on Android e.g. gamepads, stylus, etc. In orer to get GenericMotionEvents your application min API version must be at least 12, otherwise the application will receive only key events. Change-Id: I7564fccaf5423aa318ba4f62317eaf101ba6e97e Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../qtproject/qt5/android/QtActivityDelegate.java | 25 +++++++++ .../src/org/qtproject/qt5/android/QtNative.java | 6 +++ src/corelib/kernel/qjnihelpers.cpp | 63 +++++++++++++++++++++- src/corelib/kernel/qjnihelpers_p.h | 20 +++++++ 4 files changed, 113 insertions(+), 1 deletion(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java index ee196f1aef..871f9ae2c2 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java @@ -59,6 +59,7 @@ import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; +import android.view.MotionEvent; import android.view.Surface; import android.view.View; import android.view.ViewConfiguration; @@ -89,6 +90,7 @@ public class QtActivityDelegate private Method m_super_onKeyUp = null; private Method m_super_onConfigurationChanged = null; private Method m_super_onActivityResult = null; + private Method m_super_dispatchGenericMotionEvent = null; private static final String NATIVE_LIBRARIES_KEY = "native.libraries"; private static final String BUNDLED_LIBRARIES_KEY = "bundled.libraries"; @@ -475,6 +477,13 @@ public class QtActivityDelegate m_super_onKeyUp = m_activity.getClass().getMethod("super_onKeyUp", Integer.TYPE, KeyEvent.class); m_super_onConfigurationChanged = m_activity.getClass().getMethod("super_onConfigurationChanged", Configuration.class); m_super_onActivityResult = m_activity.getClass().getMethod("super_onActivityResult", Integer.TYPE, Integer.TYPE, Intent.class); + if (Build.VERSION.SDK_INT >= 12) { + try { + m_super_dispatchGenericMotionEvent = m_activity.getClass().getMethod("super_dispatchGenericMotionEvent", MotionEvent.class); + } catch (Exception e) { + } + } + } catch (Exception e) { e.printStackTrace(); return false; @@ -1043,6 +1052,9 @@ public class QtActivityDelegate QtNative.keyUp(0, event.getCharacters().charAt(0), event.getMetaState(), event.getRepeatCount() > 0); } + if (QtNative.dispatchKeyEvent(event)) + return true; + try { return (Boolean) m_super_dispatchKeyEvent.invoke(m_activity, event); } catch (Exception e) { @@ -1311,4 +1323,17 @@ public class QtActivityDelegate m_layout.moveChild(view, index); } } + + public boolean dispatchGenericMotionEvent (MotionEvent ev) + { + if (m_started && QtNative.dispatchGenericMotionEvent(ev)) + return true; + + try { + return (Boolean) m_super_dispatchGenericMotionEvent.invoke(m_activity, ev); + } catch (Exception e) { + e.printStackTrace(); + } + return false; + } } diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java index 0c01e67637..94e0e4e92b 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java @@ -48,6 +48,7 @@ import android.text.ClipboardManager; import android.os.Build; import android.util.Log; import android.view.ContextMenu; +import android.view.KeyEvent; import android.view.Menu; import android.view.MotionEvent; import android.view.View; @@ -633,6 +634,11 @@ public class QtNative public static native void keyboardVisibilityChanged(boolean visibility); // keyboard methods + // dispatch events methods + public static native boolean dispatchGenericMotionEvent(MotionEvent ev); + public static native boolean dispatchKeyEvent(KeyEvent event); + // dispatch events methods + // surface methods public static native void setSurface(int id, Object surface, int w, int h); // surface methods diff --git a/src/corelib/kernel/qjnihelpers.cpp b/src/corelib/kernel/qjnihelpers.cpp index f77fc4220c..0a5a5dffb9 100644 --- a/src/corelib/kernel/qjnihelpers.cpp +++ b/src/corelib/kernel/qjnihelpers.cpp @@ -34,6 +34,7 @@ #include "qjnihelpers_p.h" #include "qmutex.h" #include "qlist.h" +#include "qvector.h" #include QT_BEGIN_NAMESPACE @@ -56,6 +57,40 @@ static void onAndroidUiThread(JNIEnv *, jclass, jlong thiz) delete runnable; } +namespace { + struct GenericMotionEventListeners { + QMutex mutex; + QVector listeners; + }; +} +Q_GLOBAL_STATIC(GenericMotionEventListeners, g_genericMotionEventListeners) + +static jboolean dispatchGenericMotionEvent(JNIEnv *, jclass, jobject event) +{ + jboolean ret = JNI_FALSE; + QMutexLocker locker(&g_genericMotionEventListeners()->mutex); + foreach (auto listener, g_genericMotionEventListeners()->listeners) + ret |= listener->handleGenericMotionEvent(event); + return ret; +} + +namespace { + struct KeyEventListeners { + QMutex mutex; + QVector listeners; + }; +} +Q_GLOBAL_STATIC(KeyEventListeners, g_keyEventListeners) + +static jboolean dispatchKeyEvent(JNIEnv *, jclass, jobject event) +{ + jboolean ret = JNI_FALSE; + QMutexLocker locker(&g_keyEventListeners()->mutex); + foreach (auto listener, g_keyEventListeners()->listeners) + ret |= listener->handleKeyEvent(event); + return ret; +} + namespace { class ActivityResultListeners { @@ -227,7 +262,9 @@ jint QtAndroidPrivate::initJNI(JavaVM *vm, JNIEnv *env) g_javaVM = vm; static const JNINativeMethod methods[] = { - {"onAndroidUiThread", "(J)V", reinterpret_cast(onAndroidUiThread)} + {"onAndroidUiThread", "(J)V", reinterpret_cast(onAndroidUiThread)}, + {"dispatchGenericMotionEvent", "(Landroid/view/MotionEvent;)Z", reinterpret_cast(dispatchGenericMotionEvent)}, + {"dispatchKeyEvent", "(Landroid/view/KeyEvent;)Z", reinterpret_cast(dispatchKeyEvent)}, }; const bool regOk = (env->RegisterNatives(jQtNative, methods, sizeof(methods) / sizeof(methods[0])) == JNI_OK); @@ -274,4 +311,28 @@ void QtAndroidPrivate::runOnUiThread(QRunnable *runnable, JNIEnv *env) delete runnable; } +void QtAndroidPrivate::registerGenericMotionEventListener(QtAndroidPrivate::GenericMotionEventListener *listener) +{ + QMutexLocker locker(&g_genericMotionEventListeners()->mutex); + g_genericMotionEventListeners()->listeners.push_back(listener); +} + +void QtAndroidPrivate::unregisterGenericMotionEventListener(QtAndroidPrivate::GenericMotionEventListener *listener) +{ + QMutexLocker locker(&g_genericMotionEventListeners()->mutex); + g_genericMotionEventListeners()->listeners.removeOne(listener); +} + +void QtAndroidPrivate::registerKeyEventListener(QtAndroidPrivate::KeyEventListener *listener) +{ + QMutexLocker locker(&g_keyEventListeners()->mutex); + g_keyEventListeners()->listeners.push_back(listener); +} + +void QtAndroidPrivate::unregisterKeyEventListener(QtAndroidPrivate::KeyEventListener *listener) +{ + QMutexLocker locker(&g_keyEventListeners()->mutex); + g_keyEventListeners()->listeners.removeOne(listener); +} + QT_END_NAMESPACE diff --git a/src/corelib/kernel/qjnihelpers_p.h b/src/corelib/kernel/qjnihelpers_p.h index 883b08ef60..536989b4fc 100644 --- a/src/corelib/kernel/qjnihelpers_p.h +++ b/src/corelib/kernel/qjnihelpers_p.h @@ -76,6 +76,20 @@ namespace QtAndroidPrivate virtual void handleResume() {}; }; + class Q_CORE_EXPORT GenericMotionEventListener + { + public: + virtual ~GenericMotionEventListener() {} + virtual bool handleGenericMotionEvent(jobject event) = 0; + }; + + class Q_CORE_EXPORT KeyEventListener + { + public: + virtual ~KeyEventListener() {} + virtual bool handleKeyEvent(jobject event) = 0; + }; + Q_CORE_EXPORT jobject activity(); Q_CORE_EXPORT JavaVM *javaVM(); Q_CORE_EXPORT jint initJNI(JavaVM *vm, JNIEnv *env); @@ -95,6 +109,12 @@ namespace QtAndroidPrivate Q_CORE_EXPORT void handleResume(); Q_CORE_EXPORT void registerResumePauseListener(ResumePauseListener *listener); Q_CORE_EXPORT void unregisterResumePauseListener(ResumePauseListener *listener); + + Q_CORE_EXPORT void registerGenericMotionEventListener(GenericMotionEventListener *listener); + Q_CORE_EXPORT void unregisterGenericMotionEventListener(GenericMotionEventListener *listener); + + Q_CORE_EXPORT void registerKeyEventListener(KeyEventListener *listener); + Q_CORE_EXPORT void unregisterKeyEventListener(KeyEventListener *listener); } QT_END_NAMESPACE -- cgit v1.2.3 From 34966bc84f2d446f75bb0e123805f51c89e84190 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 27 Sep 2015 12:09:03 -0700 Subject: QDBusPendingCall: Remove unused member We set it to the number of types that the call expects to receive, but we never used it anywhere else. Change-Id: I42e7ef1a481840699a8dffff1407eb520b5844d8 Reviewed-by: Alex Blasche --- src/dbus/qdbuspendingcall.cpp | 1 - src/dbus/qdbuspendingcall_p.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp index ad5632be5a..c93d6acf84 100644 --- a/src/dbus/qdbuspendingcall.cpp +++ b/src/dbus/qdbuspendingcall.cpp @@ -181,7 +181,6 @@ bool QDBusPendingCallPrivate::setReplyCallback(QObject *target, const char *memb void QDBusPendingCallPrivate::setMetaTypes(int count, const int *types) { - expectedReplyCount = count; if (count == 0) { expectedReplySignature = QLatin1String(""); // not null return; diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h index dcf733679c..571a0eb028 100644 --- a/src/dbus/qdbuspendingcall_p.h +++ b/src/dbus/qdbuspendingcall_p.h @@ -89,7 +89,6 @@ public: QDBusMessage replyMessage; DBusPendingCall *pending; QString expectedReplySignature; - int expectedReplyCount; // } QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection) -- cgit v1.2.3 From 7dc0f42e7813953aa9b423e40d4be8039e6cacaa Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 27 Sep 2015 12:05:04 -0700 Subject: QDBusConnection: Remove unused members I can't find any use, ever, of them. Change-Id: I42e7ef1a481840699a8dffff1407eb1a93b128a8 Reviewed-by: Alex Blasche --- src/dbus/qdbusconnection_p.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index 49c7564566..91824c5c79 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -323,9 +323,6 @@ public: MetaObjectHash cachedMetaObjects; PendingCallList pendingCalls; - QMutex callDeliveryMutex; - QDBusCallDeliveryEvent *callDeliveryState; // protected by the callDeliveryMutex mutex - bool anonymousAuthenticationAllowed; public: -- cgit v1.2.3 From c401506ffc33053c4fe8b0e5ff492361653be12a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 27 Sep 2015 12:00:01 -0700 Subject: QDBusServer: Fix uninitialized member If you used the QString constructor overload and passed an empty address, the d pointer would remain uninitialized. Found by Coverity, CID 11724. Change-Id: I42e7ef1a481840699a8dffff1407ead3ee703d6e Reviewed-by: Alex Blasche --- src/dbus/qdbusserver.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp index 6c1b4c10ef..babb270da0 100644 --- a/src/dbus/qdbusserver.cpp +++ b/src/dbus/qdbusserver.cpp @@ -54,15 +54,13 @@ QT_BEGIN_NAMESPACE \a parent. */ QDBusServer::QDBusServer(const QString &address, QObject *parent) - : QObject(parent) + : QObject(parent), d(0) { if (address.isEmpty()) return; - if (!qdbus_loadLibDBus()) { - d = 0; + if (!qdbus_loadLibDBus()) return; - } emit QDBusConnectionManager::instance()->serverRequested(address, this); QObject::connect(d, SIGNAL(newServerConnection(QDBusConnectionPrivate*)), -- cgit v1.2.3 From c9e2763909c66a158bfe8043dd9fb7723b08b2f5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 9 Jul 2015 12:57:13 -0700 Subject: syncqt: complain if a public header includes a private one We should even cause syncqt to exit, but that would cause developers trying to test something to be unable to. So leave it just with an "ERROR" message. That is hopefully enough. Change-Id: Ib056b47dde3341ef9a52ffff13ef5f8588b62b99 Reviewed-by: Oswald Buddenhagen --- bin/syncqt.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/syncqt.pl b/bin/syncqt.pl index c682cf318a..ff539f5fe0 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -1190,6 +1190,7 @@ if($check_includes) { } if ($include) { if ($public_header) { + print STDERR "$lib: ERROR: $iheader includes private header $include\n" if ($include =~ /_p.h$/); for my $trylib (keys(%modules)) { if(-e "$out_basedir/include/$trylib/$include") { print "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n"; -- cgit v1.2.3 From 035f5478a5fa86fc404d4a873b5a394a7e2dff11 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 13 Oct 2015 14:43:41 +0200 Subject: tools: use QStringBuilder src/tools/bootstrap was already compiled with QT_USE_STRINGBUILDER, by way of load(qt_module), but the actual apps weren't. Some apps become smaller, some larger; all (presumably) faster. Change-Id: Idc8662e62ec14b27e730de9842bec295a1b5566e Reviewed-by: Thiago Macieira --- mkspecs/features/qt_tool.prf | 1 + src/tools/bootstrap/bootstrap.pro | 1 + 2 files changed, 2 insertions(+) diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 1d3e88cbe9..3f0301a292 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -12,6 +12,7 @@ load(qt_app) CONFIG += console +DEFINES *= QT_USE_QSTRINGBUILDER # If we are doing a prefix build, create a "module" pri which enables # qtPrepareTool() to work with the non-installed build. diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index d5909e68a3..b6b16dcd3d 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -103,6 +103,7 @@ SOURCES += \ ../../corelib/tools/qsize.cpp \ ../../corelib/tools/qline.cpp \ ../../corelib/tools/qstring.cpp \ + ../../corelib/tools/qstringbuilder.cpp \ ../../corelib/tools/qstring_compat.cpp \ ../../corelib/tools/qstringlist.cpp \ ../../corelib/tools/qvector.cpp \ -- cgit v1.2.3 From aa485aee2f9f1dad4072a1ed8a93c97438f9ac7e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 15 Oct 2015 03:05:26 +0200 Subject: QTextStream: optimize putString() Instead of filling a QString with the padding characters, use a QVarLengthArray. Do this only in the code path where it's actually needed, and mark that code path as unlikely. Change-Id: I11e04ccc4a07e16e430f2ea6dbb2f0f736908f5b Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/io/qtextstream.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index ccf832e2e8..5d82453270 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -222,6 +222,8 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384; #include "qbuffer.h" #include "qfile.h" #include "qnumeric.h" +#include "qvarlengtharray.h" + #ifndef Q_OS_WINCE #include #endif @@ -896,13 +898,15 @@ inline void QTextStreamPrivate::putChar(QChar ch) */ void QTextStreamPrivate::putString(const QChar *data, int len, bool number) { - QString pad; - int padLeft = 0, padRight = 0; - - // handle padding int padSize = params.fieldWidth - len; - if (padSize > 0) { - pad = QString(padSize, params.padChar); + if (Q_UNLIKELY(padSize > 0)) { + // handle padding + static const int PreallocatedPadding = 80; // typical line length + QVarLengthArray pad(padSize); + std::fill_n(pad.begin(), padSize, params.padChar); + + int padLeft = 0, padRight = 0; + switch (params.fieldAlignment) { case QTextStream::AlignLeft: padRight = padSize; @@ -925,11 +929,12 @@ void QTextStreamPrivate::putString(const QChar *data, int len, bool number) padRight = padSize - padSize/2; break; } + write(pad.constData(), padLeft); + write(data, len); + write(pad.constData(), padRight); + } else { + write(data, len); } - - write(pad.constData(), padLeft); - write(data, len); - write(pad.constData(), padRight); } /*! -- cgit v1.2.3 From 09d9af59f057b2d5d3fa196b1fd8040a4be930e4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 15 Oct 2015 13:18:14 -0700 Subject: Fix left-shift wider than an int's width The other left shifts in this file already have the Q_UINT64_C wrapper. This one was missed. Change-Id: I42e7ef1a481840699a8dffff140d758ac370c402 Reviewed-by: Marc Mutz --- src/corelib/tools/qsimd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index d0c65a04b1..ad02d2c147 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -676,7 +676,7 @@ void qDetectCpuFeatures() disable.prepend(' '); for (int i = 0; i < features_count; ++i) { if (disable.contains(features_string + features_indices[i])) - f &= ~(1 << i); + f &= ~(Q_UINT64_C(1) << i); } } -- cgit v1.2.3 From 49640d417f8e7a975a44b3e0d197112ee8b76b7f Mon Sep 17 00:00:00 2001 From: Samuel Nevala Date: Thu, 15 Oct 2015 13:16:43 +0300 Subject: winrt: Wait for main thread to exit before exit. This will allow application main to go out of scope and free objects allocated there. Change-Id: I7b7199ecf67afe578bac043f16b064c9daaae04a Task-Id: QTBUG-48760 Reviewed-by: Andrew Knight --- src/winmain/qtmain_winrt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/winmain/qtmain_winrt.cpp b/src/winmain/qtmain_winrt.cpp index b7125eec59..3553d966d8 100644 --- a/src/winmain/qtmain_winrt.cpp +++ b/src/winmain/qtmain_winrt.cpp @@ -169,6 +169,7 @@ public: }).Get()); Q_ASSERT_SUCCEEDED(hr); + WaitForSingleObjectEx(mainThread, INFINITE, FALSE); DWORD exitCode; GetExitCodeThread(mainThread, &exitCode); return exitCode; -- cgit v1.2.3 From ffa7b050a19ef0169566dd7faf4625c9c6c0763d Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 14 Oct 2015 08:11:04 +0200 Subject: winrt: Properly handle when a remote host closes a tcp connection. Task-number: QTBUG-48476 Change-Id: I1933dfe7e73330a8f0d5ac8d3d7a834e0d77270a Reviewed-by: Andrew Knight Reviewed-by: Samuel Nevala Reviewed-by: Maurice Kalinowski --- src/network/socket/qnativesocketengine_winrt.cpp | 35 ++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp index 44de7f8526..d41bd4d313 100644 --- a/src/network/socket/qnativesocketengine_winrt.cpp +++ b/src/network/socket/qnativesocketengine_winrt.cpp @@ -420,6 +420,16 @@ void QNativeSocketEngine::close() { Q_D(QNativeSocketEngine); + if (d->closingDown) + return; + + d->closingDown = true; + + + d->notifyOnRead = false; + d->notifyOnWrite = false; + d->notifyOnException = false; + if (d->connectOp) { ComPtr info; d->connectOp.As(&info); @@ -440,7 +450,6 @@ void QNativeSocketEngine::close() } if (socket) { - d->closingDown = true; socket->Close(); d->socketDescriptor = -1; } @@ -498,6 +507,14 @@ qint64 QNativeSocketEngine::read(char *data, qint64 maxlen) if (d->socketType != QAbstractSocket::TcpSocket) return -1; + // There will be a read notification when the socket was closed by the remote host. If that + // happens and there isn't anything left in the buffer, we have to return -1 in order to signal + // the closing of the socket. + if (d->readBytes.pos() == d->readBytes.size() && d->socketState != QAbstractSocket::ConnectedState) { + close(); + return -1; + } + QMutexLocker mutexLocker(&d->readMutex); return d->readBytes.read(data, maxlen); } @@ -1184,8 +1201,16 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async if (wasDeleted || isDeletingChildren) return S_OK; - if (status == Error || status == Canceled) + // A read in UnconnectedState will close the socket and return -1 and thus tell the caller, + // that the connection was closed. The socket cannot be closed here, as the subsequent read + // might fail then. + if (status == Error || status == Canceled) { + setError(QAbstractSocket::NetworkError, RemoteHostClosedErrorString); + socketState = QAbstractSocket::UnconnectedState; + if (notifyOnRead) + emit q->readReady(); return S_OK; + } ComPtr buffer; HRESULT hr = asyncInfo->GetResults(&buffer); @@ -1194,7 +1219,13 @@ HRESULT QNativeSocketEnginePrivate::handleReadyRead(IAsyncBufferOperation *async UINT32 bufferLength; hr = buffer->get_Length(&bufferLength); Q_ASSERT_SUCCEEDED(hr); + // A zero sized buffer length signals, that the remote host closed the connection. The socket + // cannot be closed though, as the following read might have socket descriptor -1 and thus and + // the closing of the socket won't be communicated to the caller. So only the error is set. The + // actual socket close happens inside of read. if (!bufferLength) { + setError(QAbstractSocket::NetworkError, RemoteHostClosedErrorString); + socketState = QAbstractSocket::UnconnectedState; if (notifyOnRead) emit q->readReady(); return S_OK; -- cgit v1.2.3 From 4f829afc610272bd3396c222df1034990566d149 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 8 Jul 2015 13:51:59 -0700 Subject: Turn C++11 on by default if the compiler supports C++11 [ChangeLog][Important Behavior Changes] qmake now enables C++11 support by default if the compiler is known to support it (unless the compiler defaults to C++14 or a later edition). To disable this, add to your .pro file: CONFIG -= c++11. Note that Qt 5.7 will require C++11 support, so it is a good idea to ensure your code works with that compiler setting. (Note: it is not possible to disable C++11 support with Microsoft Visual Studio) Change-Id: Ib056b47dde3341ef9a52ffff13ef13ee2cf888eb Reviewed-by: Kai Koehne Reviewed-by: Lars Knoll --- mkspecs/features/default_pre.prf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index eb3281ea1d..a247b46a72 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -8,6 +8,8 @@ CONFIG = \ testcase_targets import_plugins import_qpa_plugin \ $$CONFIG +contains(QT_CONFIG, c++11):lessThan(QT_COMPILER_STDCXX, 201103): CONFIG += c++11 + !build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") { # # call license checker (but cache result for one day) -- cgit v1.2.3 From d49c0eb3fc7f783016b58b989d2bed956418adb4 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 16 Oct 2015 12:51:45 +0200 Subject: WinRT: Initialize platform services platformServices has not been created and caused a crash as soon as an URL gets opened. Task-number: QTBUG-48740 Change-Id: Ib099a0ff3007b168738e02c0fab8f9ca7bcd25c7 Reviewed-by: Andrew Knight --- src/plugins/platforms/winrt/qwinrtintegration.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/winrt/qwinrtintegration.cpp b/src/plugins/platforms/winrt/qwinrtintegration.cpp index fce77c56d1..612f722481 100644 --- a/src/plugins/platforms/winrt/qwinrtintegration.cpp +++ b/src/plugins/platforms/winrt/qwinrtintegration.cpp @@ -151,6 +151,8 @@ QWinRTIntegration::QWinRTIntegration() : d_ptr(new QWinRTIntegrationPrivate) return S_OK; }); Q_ASSERT_SUCCEEDED(hr); + + d->platformServices = new QWinRTServices; } QWinRTIntegration::~QWinRTIntegration() -- cgit v1.2.3 From b37a548d083cf686cc6212fe9345c06406091f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 13 Oct 2015 16:06:54 +0200 Subject: Clarify foreign window documentation a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I50193cb0c106bc17a008e6778d2d722545c7cb1c Reviewed-by: Venugopal Shivashankar Reviewed-by: Lars Knoll Reviewed-by: Topi Reiniö --- src/gui/kernel/qplatformintegration.cpp | 3 +-- src/gui/kernel/qwindow.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 457a420148..14633d8b30 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -208,8 +208,7 @@ QPlatformServices *QPlatformIntegration::services() const behavior for desktop platforms. \value ForeignWindows The platform allows creating QWindows which represent - native windows created by other processes or anyway created by using native - libraries. + native windows created by other processes or by using native libraries. \value NonFullScreenWindows The platform supports top-level windows which do not fill the screen. The default implementation returns \c true. Returning false for diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index f1c754c422..9ca5d3e9f8 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -588,8 +588,7 @@ QWindow *QWindow::parent() const Setting \a parent to be 0 will make the window become a top level window. If \a parent is a window created by fromWinId(), then the current window - will be embedded inside \a parent, if the platform supports it. Window - embedding is currently supported only by the X11 platform plugin. + will be embedded inside \a parent, if the platform supports it. */ void QWindow::setParent(QWindow *parent) { @@ -2377,9 +2376,11 @@ QWindow *QWindowPrivate::topLevelWindow() const Given the handle \a id to a native window, this method creates a QWindow object which can be used to represent the window when invoking methods like setParent() and setTransientParent(). - This can be used, on platforms which support it, to embed a window inside a - container or to make a window stick on top of a window created by another - process. + + This can be used, on platforms which support it, to embed a QWindow inside a + native window, or to embed a native window inside a QWindow. + + If foreign windows are not supported, this function returns 0. \sa setParent() \sa setTransientParent() -- cgit v1.2.3 From e9835a3812f91fc4a948a606fd751382d4ecf248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 13 Oct 2015 16:13:30 +0200 Subject: Document that QWindow::fromWinId() should be used with caution Change-Id: I28c58fb720c323048615efe677a920f179ef9d20 Reviewed-by: Lars Knoll Reviewed-by: Friedemann Kleint --- src/gui/kernel/qwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 9ca5d3e9f8..dbacfba4a8 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2382,6 +2382,11 @@ QWindow *QWindowPrivate::topLevelWindow() const If foreign windows are not supported, this function returns 0. + \note The resulting QWindow should not be used to manipulate the underlying + native window (besides re-parenting), or to observe state changes of the + native window. Any support for these kind of operations is incidental, highly + platform dependent and untested. + \sa setParent() \sa setTransientParent() */ -- cgit v1.2.3 From dde8d5e3a006c87b7a3f18733ba255d6354fcd37 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 15 Oct 2015 14:47:18 +0200 Subject: QTextStream: add missing op<<(QStringRef) It simply is missing. We could wait for QStringView to come around, but I need this function in uic _now_, so let's add it. [ChangeLog][QtCore][QTextStream] Can now stream QStringRef without converting to a QString first. Change-Id: Idd178e0ba8a89c025f4533d46de912cbdb3883d5 Reviewed-by: Lars Knoll --- src/corelib/io/qtextstream.cpp | 15 +++++++++++++++ src/corelib/io/qtextstream.h | 1 + tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 5d82453270..64222c2212 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -2519,6 +2519,21 @@ QTextStream &QTextStream::operator<<(QLatin1String string) return *this; } +/*! + \since 5.6 + \overload + + Writes \a string to the stream, and returns a reference to the + QTextStream. +*/ +QTextStream &QTextStream::operator<<(const QStringRef &string) +{ + Q_D(QTextStream); + CHECK_VALID_STREAM(*this); + d->putString(string.data(), string.size()); + return *this; +} + /*! \overload diff --git a/src/corelib/io/qtextstream.h b/src/corelib/io/qtextstream.h index eb33db63d7..d7566e6f7b 100644 --- a/src/corelib/io/qtextstream.h +++ b/src/corelib/io/qtextstream.h @@ -179,6 +179,7 @@ public: QTextStream &operator<<(double f); QTextStream &operator<<(const QString &s); QTextStream &operator<<(QLatin1String s); + QTextStream &operator<<(const QStringRef &s); QTextStream &operator<<(const QByteArray &array); QTextStream &operator<<(const char *c); QTextStream &operator<<(const void *ptr); diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp index ecec97f009..6e58642eb6 100644 --- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp @@ -163,6 +163,7 @@ private slots: void string_write_operator_ToDevice_data(); void string_write_operator_ToDevice(); void latin1String_write_operator_ToDevice(); + void stringref_write_operator_ToDevice(); // other void skipWhiteSpace_data(); @@ -2554,6 +2555,22 @@ void tst_QTextStream::latin1String_write_operator_ToDevice() QCOMPARE(buf.buffer().constData(), "No explicit lengthExplicit length"); } +void tst_QTextStream::stringref_write_operator_ToDevice() +{ + QBuffer buf; + buf.open(QBuffer::WriteOnly); + QTextStream stream(&buf); + stream.setCodec(QTextCodec::codecForName("ISO-8859-1")); + stream.setAutoDetectUnicode(true); + + const QString expected = "No explicit lengthExplicit length"; + + stream << expected.leftRef(18); + stream << expected.midRef(18); + stream.flush(); + QCOMPARE(buf.buffer().constData(), "No explicit lengthExplicit length"); +} + // ------------------------------------------------------------------------------ void tst_QTextStream::useCase1() { -- cgit v1.2.3 From 1901adbab796e27e7ed862e850a2171ffc4dde90 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 12 Oct 2015 10:41:21 +0200 Subject: Split two error cases so they get reported distinctly. If a macro is used with too few parameters, complaining about its definition using '#' followed by something other than a macro parameter name is apt to be confusing - reading the definition will reveal that the name in fact is a macro parameter after all. The reader needs attention directed to the invocation, not the definition. Split the test in two: one to test the prior error message does in fact get produced for an invalid macro definition, the other to test the invalid invocation case. Task-number: QTBUG-46210 Change-Id: Ie177a56d346e553bf9d67e2008a4352633afa1ae Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/tools/moc/preprocessor.cpp | 5 ++++- tests/auto/tools/moc/tst_moc.cpp | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index d036c40f35..a2a1a958cf 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -658,9 +658,12 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym expansion += s; } } else if (mode == Hash) { - if (index < 0 || index >= arguments.size()) { + if (index < 0) { that->error("'#' is not followed by a macro parameter"); continue; + } else if (index >= arguments.size()) { + that->error("Macro invoked with too few parameters for a use of '#'"); + continue; } const Symbols &arg = arguments.at(index); diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index fa1b68b4f9..4fa98b6ecb 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -1883,12 +1883,19 @@ void tst_Moc::warnings_data() << QString() << QString("standard input:5: Error: Class declaration lacks Q_OBJECT macro."); - QTest::newRow("QTBUG-46210: crash on invalid macro") - << QByteArray("#define Foo(a, b, c) a b c #a #b #c a##b##c #d\n Foo(45);") + QTest::newRow("Invalid macro definition") + << QByteArray("#define Foo(a, b, c) a b c #a #b #c a##b##c #d\n Foo(45, 42, 39);") << QStringList() << 1 << QString("IGNORE_ALL_STDOUT") << QString(":2: Error: '#' is not followed by a macro parameter"); + + QTest::newRow("QTBUG-46210: crash on invalid macro invocation") + << QByteArray("#define Foo(a, b, c) a b c #a #b #c a##b##c\n Foo(45);") + << QStringList() + << 1 + << QString("IGNORE_ALL_STDOUT") + << QString(":2: Error: Macro invoked with too few parameters for a use of '#'"); } void tst_Moc::warnings() -- cgit v1.2.3 From 5632375b86f467177b7cd326d2e194692753f4a6 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 16 Oct 2015 15:35:27 +0200 Subject: Cocoa integration - fix Qt::WindowFullscreenButtonHint Window collection behavior changed from OS X <= 10.9 to 10.10 to 10.11: - the default behavior (0) included fullscreen button before 10.10, did not include in 10.10, and now it's again included. - it's not enough to exclude fullscreen - since the defualt is 0, 0 & ~fullscreen does not help - we also have to set fullscreen auxiliary. Task-number: QTBUG-48759 Change-Id: If427bd5cfa5c3cefc71f09dae7baa0d232601ee4 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoawindow.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 6f1e355790..a545dbddd5 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -885,10 +885,13 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags) Qt::WindowType type = window()->type(); if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) { NSWindowCollectionBehavior behavior = [m_nsWindow collectionBehavior]; - if (flags & Qt::WindowFullscreenButtonHint) + if (flags & Qt::WindowFullscreenButtonHint) { behavior |= NSWindowCollectionBehaviorFullScreenPrimary; - else + behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary; + } else { + behavior |= NSWindowCollectionBehaviorFullScreenAuxiliary; behavior &= ~NSWindowCollectionBehaviorFullScreenPrimary; + } [m_nsWindow setCollectionBehavior:behavior]; } setWindowZoomButton(flags); -- cgit v1.2.3 From c63f4c5d015e265f7e7c0cd410787470e66f00e4 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 28 May 2015 10:55:12 +0300 Subject: Android: Set "immersive" mode on earlier android versions. Most of "immersive" flags are available on earlier Android versions. Change-Id: Ic4f03a3c9491570bc5f8c5afbb61669644b20d8e Reviewed-by: Christian Stromme --- .../qtproject/qt5/android/QtActivityDelegate.java | 39 ++++++++++------------ 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java index 871f9ae2c2..064b538e1f 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java @@ -133,37 +133,32 @@ public class QtActivityDelegate if (m_fullScreen = enterFullScreen) { m_activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); m_activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); - if (Build.VERSION.SDK_INT >= 19) { - try { - int ui_flag_immersive_sticky = View.class.getDeclaredField("SYSTEM_UI_FLAG_IMMERSIVE_STICKY").getInt(null); - int ui_flag_layout_stable = View.class.getDeclaredField("SYSTEM_UI_FLAG_LAYOUT_STABLE").getInt(null); - int ui_flag_layout_hide_navigation = View.class.getDeclaredField("SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION").getInt(null); - int ui_flag_layout_fullscreen = View.class.getDeclaredField("SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN").getInt(null); - int ui_flag_hide_navigation = View.class.getDeclaredField("SYSTEM_UI_FLAG_HIDE_NAVIGATION").getInt(null); - int ui_flag_fullscreen = View.class.getDeclaredField("SYSTEM_UI_FLAG_FULLSCREEN").getInt(null); - + try { + if (Build.VERSION.SDK_INT >= 14) { + int flags = View.class.getDeclaredField("SYSTEM_UI_FLAG_HIDE_NAVIGATION").getInt(null); + if (Build.VERSION.SDK_INT >= 16) { + flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_LAYOUT_STABLE").getInt(null); + flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION").getInt(null); + flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN").getInt(null); + flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_FULLSCREEN").getInt(null); + + if (Build.VERSION.SDK_INT >= 19) + flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_IMMERSIVE_STICKY").getInt(null); + } Method m = View.class.getMethod("setSystemUiVisibility", int.class); - m.invoke(m_activity.getWindow().getDecorView(), - ui_flag_layout_stable - | ui_flag_layout_hide_navigation - | ui_flag_layout_fullscreen - | ui_flag_hide_navigation - | ui_flag_fullscreen - | ui_flag_immersive_sticky - | View.INVISIBLE); - } catch (Exception e) { - e.printStackTrace(); + m.invoke(m_activity.getWindow().getDecorView(), flags | View.INVISIBLE); } + } catch (Exception e) { + e.printStackTrace(); } } else { m_activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); m_activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); - if (Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 14) { try { int ui_flag_visible = View.class.getDeclaredField("SYSTEM_UI_FLAG_VISIBLE").getInt(null); Method m = View.class.getMethod("setSystemUiVisibility", int.class); - m.invoke(m_activity.getWindow().getDecorView(), - ui_flag_visible); + m.invoke(m_activity.getWindow().getDecorView(), ui_flag_visible); } catch (Exception e) { e.printStackTrace(); } -- cgit v1.2.3 From 40b4c305d82e75d23842348a537972a0d2f15887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 16 Oct 2015 14:40:53 +0200 Subject: Check that QPlatformIntegration::createPlatformWindow() doesn't fail We expect createPlatformWindow() to return a valid platform window. If it fails we now assert in debug, and emit a warning in release. The only platform where this is currently possible is on Windows, where the platform plugin will return 0 if CreateWindowEx for some reason fails. Change-Id: Ia2461efcfc48d180e073fa372d9c385650129e1c Reviewed-by: Friedemann Kleint --- src/gui/kernel/qwindow.cpp | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index dbacfba4a8..e262f3f8a4 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -389,25 +389,31 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate) void QWindowPrivate::create(bool recursive) { Q_Q(QWindow); + if (platformWindow) + return; + + platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(q); + Q_ASSERT(platformWindow); + if (!platformWindow) { - platformWindow = QGuiApplicationPrivate::platformIntegration()->createPlatformWindow(q); - QObjectList childObjects = q->children(); - for (int i = 0; i < childObjects.size(); i ++) { - QObject *object = childObjects.at(i); - if (object->isWindowType()) { - QWindow *window = static_cast(object); - if (recursive) - window->d_func()->create(true); - if (window->d_func()->platformWindow) - window->d_func()->platformWindow->setParent(platformWindow); - } - } + qWarning() << "Failed to create platform window for" << q << "with flags" << q->flags(); + return; + } - if (platformWindow) { - QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated); - QGuiApplication::sendEvent(q, &e); + QObjectList childObjects = q->children(); + for (int i = 0; i < childObjects.size(); i ++) { + QObject *object = childObjects.at(i); + if (object->isWindowType()) { + QWindow *window = static_cast(object); + if (recursive) + window->d_func()->create(true); + if (window->d_func()->platformWindow) + window->d_func()->platformWindow->setParent(platformWindow); } } + + QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated); + QGuiApplication::sendEvent(q, &e); } void QWindowPrivate::clearFocusObject() -- cgit v1.2.3 From c751cef8d6fe3e6bee1ec9a0466094b3255ca037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 30 Jun 2015 13:28:31 +0200 Subject: Move QEventDispatcherCoreFoundation to QtCore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Export it for use by the iOS platform plugin. Also move QCFSocketNotifier, and export for use by the Cocoa platform plugin. This is a pure code move with no intended behavior changes, in anticipation of using the Core Foundation event dispatcher as the default Qt Core event dispatcher on OS X. Change-Id: I43677d2f6f3c1d0ed0415c964225aa97d2f13078 Reviewed-by: Tor Arne Vestbø --- src/corelib/kernel/kernel.pri | 13 +- src/corelib/kernel/qcfsocketnotifier.cpp | 303 ++++++++++ src/corelib/kernel/qcfsocketnotifier_p.h | 105 ++++ src/corelib/kernel/qeventdispatcher_cf.mm | 624 +++++++++++++++++++++ src/corelib/kernel/qeventdispatcher_cf_p.h | 280 +++++++++ .../cfsocketnotifier/cfsocketnotifier.pri | 4 - .../cfsocketnotifier/qcfsocketnotifier.cpp | 303 ---------- .../cfsocketnotifier/qcfsocketnotifier_p.h | 105 ---- .../eventdispatchers/eventdispatchers.pri | 8 - .../eventdispatchers/qeventdispatcher_cf.mm | 624 --------------------- .../eventdispatchers/qeventdispatcher_cf_p.h | 280 --------- src/platformsupport/platformsupport.pro | 1 - .../platforms/cocoa/qcocoaeventdispatcher.h | 2 +- src/plugins/platforms/ios/qioseventdispatcher.h | 2 +- 14 files changed, 1325 insertions(+), 1329 deletions(-) create mode 100644 src/corelib/kernel/qcfsocketnotifier.cpp create mode 100644 src/corelib/kernel/qcfsocketnotifier_p.h create mode 100644 src/corelib/kernel/qeventdispatcher_cf.mm create mode 100644 src/corelib/kernel/qeventdispatcher_cf_p.h delete mode 100644 src/platformsupport/cfsocketnotifier/cfsocketnotifier.pri delete mode 100644 src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp delete mode 100644 src/platformsupport/cfsocketnotifier/qcfsocketnotifier_p.h delete mode 100644 src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm delete mode 100644 src/platformsupport/eventdispatchers/qeventdispatcher_cf_p.h diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri index 65dc44def2..600c28b5d7 100644 --- a/src/corelib/kernel/kernel.pri +++ b/src/corelib/kernel/kernel.pri @@ -100,9 +100,11 @@ winrt { mac { HEADERS += \ + kernel/qcfsocketnotifier_p.h \ kernel/qcore_mac_p.h SOURCES += \ + kernel/qcfsocketnotifier.cpp \ kernel/qcoreapplication_mac.cpp \ kernel/qcore_mac.cpp @@ -113,8 +115,15 @@ mac { osx: LIBS_PRIVATE += -framework CoreServices - # We need UIKit for UIDevice - ios: LIBS_PRIVATE += -framework UIKit + ios { + OBJECTIVE_SOURCES += \ + kernel/qeventdispatcher_cf.mm + HEADERS += \ + kernel/qeventdispatcher_cf_p.h + + # We need UIKit for UIDevice + LIBS_PRIVATE += -framework UIKit + } } nacl { diff --git a/src/corelib/kernel/qcfsocketnotifier.cpp b/src/corelib/kernel/qcfsocketnotifier.cpp new file mode 100644 index 0000000000..19f9e744b8 --- /dev/null +++ b/src/corelib/kernel/qcfsocketnotifier.cpp @@ -0,0 +1,303 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcfsocketnotifier_p.h" +#include +#include +#include + + +/************************************************************************** + Socket Notifiers + *************************************************************************/ +void qt_mac_socket_callback(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef, + const void *, void *info) +{ + + QCFSocketNotifier *cfSocketNotifier = static_cast(info); + int nativeSocket = CFSocketGetNative(s); + MacSocketInfo *socketInfo = cfSocketNotifier->macSockets.value(nativeSocket); + QEvent notifierEvent(QEvent::SockAct); + + // There is a race condition that happen where we disable the notifier and + // the kernel still has a notification to pass on. We then get this + // notification after we've successfully disabled the CFSocket, but our Qt + // notifier is now gone. The upshot is we have to check the notifier + // every time. + if (callbackType == kCFSocketReadCallBack) { + if (socketInfo->readNotifier && socketInfo->readEnabled) { + socketInfo->readEnabled = false; + QCoreApplication::sendEvent(socketInfo->readNotifier, ¬ifierEvent); + } + } else if (callbackType == kCFSocketWriteCallBack) { + if (socketInfo->writeNotifier && socketInfo->writeEnabled) { + socketInfo->writeEnabled = false; + QCoreApplication::sendEvent(socketInfo->writeNotifier, ¬ifierEvent); + } + } + + if (cfSocketNotifier->maybeCancelWaitForMoreEvents) + cfSocketNotifier->maybeCancelWaitForMoreEvents(cfSocketNotifier->eventDispatcher); +} + +/* + Adds a loop source for the given socket to the current run loop. +*/ +CFRunLoopSourceRef qt_mac_add_socket_to_runloop(const CFSocketRef socket) +{ + CFRunLoopSourceRef loopSource = CFSocketCreateRunLoopSource(kCFAllocatorDefault, socket, 0); + if (!loopSource) + return 0; + + CFRunLoopAddSource(CFRunLoopGetMain(), loopSource, kCFRunLoopCommonModes); + return loopSource; +} + +/* + Removes the loop source for the given socket from the current run loop. +*/ +void qt_mac_remove_socket_from_runloop(const CFSocketRef socket, CFRunLoopSourceRef runloop) +{ + Q_ASSERT(runloop); + CFRunLoopRemoveSource(CFRunLoopGetMain(), runloop, kCFRunLoopCommonModes); + CFSocketDisableCallBacks(socket, kCFSocketReadCallBack); + CFSocketDisableCallBacks(socket, kCFSocketWriteCallBack); +} + +QCFSocketNotifier::QCFSocketNotifier() + : eventDispatcher(0) + , maybeCancelWaitForMoreEvents(0) + , enableNotifiersObserver(0) +{ + +} + +QCFSocketNotifier::~QCFSocketNotifier() +{ + +} + +void QCFSocketNotifier::setHostEventDispatcher(QAbstractEventDispatcher *hostEventDispacher) +{ + eventDispatcher = hostEventDispacher; +} + +void QCFSocketNotifier::setMaybeCancelWaitForMoreEventsCallback(MaybeCancelWaitForMoreEventsFn callBack) +{ + maybeCancelWaitForMoreEvents = callBack; +} + +void QCFSocketNotifier::registerSocketNotifier(QSocketNotifier *notifier) +{ + Q_ASSERT(notifier); + int nativeSocket = notifier->socket(); + int type = notifier->type(); +#ifndef QT_NO_DEBUG + if (nativeSocket < 0 || nativeSocket > FD_SETSIZE) { + qWarning("QSocketNotifier: Internal error"); + return; + } else if (notifier->thread() != eventDispatcher->thread() + || eventDispatcher->thread() != QThread::currentThread()) { + qWarning("QSocketNotifier: socket notifiers cannot be enabled from another thread"); + return; + } +#endif + + if (type == QSocketNotifier::Exception) { + qWarning("QSocketNotifier::Exception is not supported on iOS"); + return; + } + + // Check if we have a CFSocket for the native socket, create one if not. + MacSocketInfo *socketInfo = macSockets.value(nativeSocket); + if (!socketInfo) { + socketInfo = new MacSocketInfo(); + + // Create CFSocket, specify that we want both read and write callbacks (the callbacks + // are enabled/disabled later on). + const int callbackTypes = kCFSocketReadCallBack | kCFSocketWriteCallBack; + CFSocketContext context = {0, this, 0, 0, 0}; + socketInfo->socket = CFSocketCreateWithNative(kCFAllocatorDefault, nativeSocket, callbackTypes, qt_mac_socket_callback, &context); + if (CFSocketIsValid(socketInfo->socket) == false) { + qWarning("QEventDispatcherMac::registerSocketNotifier: Failed to create CFSocket"); + return; + } + + CFOptionFlags flags = CFSocketGetSocketFlags(socketInfo->socket); + // QSocketNotifier doesn't close the socket upon destruction/invalidation + flags &= ~kCFSocketCloseOnInvalidate; + // Expicitly disable automatic re-enable, as we do that manually on each runloop pass + flags &= ~(kCFSocketAutomaticallyReenableWriteCallBack | kCFSocketAutomaticallyReenableReadCallBack); + CFSocketSetSocketFlags(socketInfo->socket, flags); + + macSockets.insert(nativeSocket, socketInfo); + } + + if (type == QSocketNotifier::Read) { + Q_ASSERT(socketInfo->readNotifier == 0); + socketInfo->readNotifier = notifier; + socketInfo->readEnabled = false; + } else if (type == QSocketNotifier::Write) { + Q_ASSERT(socketInfo->writeNotifier == 0); + socketInfo->writeNotifier = notifier; + socketInfo->writeEnabled = false; + } + + if (!enableNotifiersObserver) { + // Create a run loop observer which enables the socket notifiers on each + // pass of the run loop, before any sources are processed. + CFRunLoopObserverContext context = {}; + context.info = this; + enableNotifiersObserver = CFRunLoopObserverCreate(kCFAllocatorDefault, kCFRunLoopBeforeSources, + true, 0, enableSocketNotifiers, &context); + Q_ASSERT(enableNotifiersObserver); + CFRunLoopAddObserver(CFRunLoopGetMain(), enableNotifiersObserver, kCFRunLoopCommonModes); + } +} + +void QCFSocketNotifier::unregisterSocketNotifier(QSocketNotifier *notifier) +{ + Q_ASSERT(notifier); + int nativeSocket = notifier->socket(); + int type = notifier->type(); +#ifndef QT_NO_DEBUG + if (nativeSocket < 0 || nativeSocket > FD_SETSIZE) { + qWarning("QSocketNotifier: Internal error"); + return; + } else if (notifier->thread() != eventDispatcher->thread() || eventDispatcher->thread() != QThread::currentThread()) { + qWarning("QSocketNotifier: socket notifiers cannot be disabled from another thread"); + return; + } +#endif + + if (type == QSocketNotifier::Exception) { + qWarning("QSocketNotifier::Exception is not supported on iOS"); + return; + } + MacSocketInfo *socketInfo = macSockets.value(nativeSocket); + if (!socketInfo) { + qWarning("QEventDispatcherMac::unregisterSocketNotifier: Tried to unregister a not registered notifier"); + return; + } + + // Decrement read/write counters and disable callbacks if necessary. + if (type == QSocketNotifier::Read) { + Q_ASSERT(notifier == socketInfo->readNotifier); + socketInfo->readNotifier = 0; + socketInfo->readEnabled = false; + CFSocketDisableCallBacks(socketInfo->socket, kCFSocketReadCallBack); + } else if (type == QSocketNotifier::Write) { + Q_ASSERT(notifier == socketInfo->writeNotifier); + socketInfo->writeNotifier = 0; + socketInfo->writeEnabled = false; + CFSocketDisableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); + } + + // Remove CFSocket from runloop if this was the last QSocketNotifier. + if (socketInfo->readNotifier == 0 && socketInfo->writeNotifier == 0) { + unregisterSocketInfo(socketInfo); + delete socketInfo; + macSockets.remove(nativeSocket); + } +} + +void QCFSocketNotifier::removeSocketNotifiers() +{ + // Remove CFSockets from the runloop. + foreach (MacSocketInfo *socketInfo, macSockets) { + unregisterSocketInfo(socketInfo); + delete socketInfo; + } + + macSockets.clear(); + + destroyRunLoopObserver(); +} + +void QCFSocketNotifier::destroyRunLoopObserver() +{ + if (!enableNotifiersObserver) + return; + + CFRunLoopObserverInvalidate(enableNotifiersObserver); + CFRelease(enableNotifiersObserver); + enableNotifiersObserver = 0; +} + +void QCFSocketNotifier::unregisterSocketInfo(MacSocketInfo *socketInfo) +{ + if (socketInfo->runloop) { + if (CFSocketIsValid(socketInfo->socket)) + qt_mac_remove_socket_from_runloop(socketInfo->socket, socketInfo->runloop); + CFRunLoopSourceInvalidate(socketInfo->runloop); + CFRelease(socketInfo->runloop); + } + CFSocketInvalidate(socketInfo->socket); + CFRelease(socketInfo->socket); +} + +void QCFSocketNotifier::enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info) +{ + Q_UNUSED(ref); + Q_UNUSED(activity); + + QCFSocketNotifier *that = static_cast(info); + + foreach (MacSocketInfo *socketInfo, that->macSockets) { + if (!CFSocketIsValid(socketInfo->socket)) + continue; + + if (!socketInfo->runloop) { + // Add CFSocket to runloop. + if (!(socketInfo->runloop = qt_mac_add_socket_to_runloop(socketInfo->socket))) { + qWarning("QEventDispatcherMac::registerSocketNotifier: Failed to add CFSocket to runloop"); + CFSocketInvalidate(socketInfo->socket); + continue; + } + + if (!socketInfo->readNotifier) + CFSocketDisableCallBacks(socketInfo->socket, kCFSocketReadCallBack); + if (!socketInfo->writeNotifier) + CFSocketDisableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); + } + + if (socketInfo->readNotifier && !socketInfo->readEnabled) { + socketInfo->readEnabled = true; + CFSocketEnableCallBacks(socketInfo->socket, kCFSocketReadCallBack); + } + if (socketInfo->writeNotifier && !socketInfo->writeEnabled) { + socketInfo->writeEnabled = true; + CFSocketEnableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); + } + } +} diff --git a/src/corelib/kernel/qcfsocketnotifier_p.h b/src/corelib/kernel/qcfsocketnotifier_p.h new file mode 100644 index 0000000000..947efecca3 --- /dev/null +++ b/src/corelib/kernel/qcfsocketnotifier_p.h @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCFSOCKETNOTIFIER_P_H +#define QCFSOCKETNOTIFIER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +struct MacSocketInfo { + MacSocketInfo() : socket(0), runloop(0), readNotifier(0), writeNotifier(0), + readEnabled(false), writeEnabled(false) {} + CFSocketRef socket; + CFRunLoopSourceRef runloop; + QObject *readNotifier; + QObject *writeNotifier; + bool readEnabled; + bool writeEnabled; +}; +typedef QHash MacSocketHash; + +typedef void (*MaybeCancelWaitForMoreEventsFn)(QAbstractEventDispatcher *hostEventDispacher); + +// The CoreFoundationSocketNotifier class implements socket notifiers support using +// CFSocket for event dispatchers running on top of the Core Foundation run loop system. +// (currently Mac and iOS) +// +// The principal functions are registerSocketNotifier() and unregisterSocketNotifier(). +// +// setHostEventDispatcher() should be called at startup. +// removeSocketNotifiers() should be called at shutdown. +// +class Q_CORE_EXPORT QCFSocketNotifier +{ +public: + QCFSocketNotifier(); + ~QCFSocketNotifier(); + void setHostEventDispatcher(QAbstractEventDispatcher *hostEventDispacher); + void setMaybeCancelWaitForMoreEventsCallback(MaybeCancelWaitForMoreEventsFn callBack); + void registerSocketNotifier(QSocketNotifier *notifier); + void unregisterSocketNotifier(QSocketNotifier *notifier); + void removeSocketNotifiers(); + +private: + void destroyRunLoopObserver(); + + static void unregisterSocketInfo(MacSocketInfo *socketInfo); + static void enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info); + + MacSocketHash macSockets; + QAbstractEventDispatcher *eventDispatcher; + MaybeCancelWaitForMoreEventsFn maybeCancelWaitForMoreEvents; + CFRunLoopObserverRef enableNotifiersObserver; + + friend void qt_mac_socket_callback(CFSocketRef, CFSocketCallBackType, CFDataRef, const void *, void *); +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm new file mode 100644 index 0000000000..5b9ad38b28 --- /dev/null +++ b/src/corelib/kernel/qeventdispatcher_cf.mm @@ -0,0 +1,624 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeventdispatcher_cf_p.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +@interface RunLoopModeTracker : NSObject { + QStack m_runLoopModes; +} +@end + +@implementation RunLoopModeTracker + +- (id) init +{ + if (self = [super init]) { + m_runLoopModes.push(kCFRunLoopDefaultMode); + + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(receivedNotification:) + name:nil + object:[UIApplication sharedApplication]]; + } + + return self; +} + +- (void) dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [super dealloc]; +} + +static CFStringRef runLoopMode(NSDictionary *dictionary) +{ + for (NSString *key in dictionary) { + if (CFStringHasSuffix((CFStringRef)key, CFSTR("RunLoopMode"))) + return (CFStringRef)[dictionary objectForKey: key]; + } + + return nil; +} + +- (void) receivedNotification:(NSNotification *) notification +{ + if (CFStringHasSuffix((CFStringRef)notification.name, CFSTR("RunLoopModePushNotification"))) { + if (CFStringRef mode = runLoopMode(notification.userInfo)) + m_runLoopModes.push(mode); + else + qWarning("Encountered run loop push notification without run loop mode!"); + + } else if (CFStringHasSuffix((CFStringRef)notification.name, CFSTR("RunLoopModePopNotification"))) { + CFStringRef mode = runLoopMode(notification.userInfo); + if (CFStringCompare(mode, [self currentMode], 0) == kCFCompareEqualTo) + m_runLoopModes.pop(); + else + qWarning("Tried to pop run loop mode '%s' that was never pushed!", qPrintable(QCFString::toQString(mode))); + + Q_ASSERT(m_runLoopModes.size() >= 1); + } +} + +- (CFStringRef) currentMode +{ + return m_runLoopModes.top(); +} + +@end + +QT_BEGIN_NAMESPACE +QT_USE_NAMESPACE + +class RunLoopDebugger : public QObject +{ + Q_OBJECT + + Q_ENUMS(Activity) + Q_ENUMS(Result) + +public: + + #define Q_MIRROR_ENUM(name) name = name + + enum Activity { + Q_MIRROR_ENUM(kCFRunLoopEntry), + Q_MIRROR_ENUM(kCFRunLoopBeforeTimers), + Q_MIRROR_ENUM(kCFRunLoopBeforeSources), + Q_MIRROR_ENUM(kCFRunLoopBeforeWaiting), + Q_MIRROR_ENUM(kCFRunLoopAfterWaiting), + Q_MIRROR_ENUM(kCFRunLoopExit) + }; + + enum Result { + Q_MIRROR_ENUM(kCFRunLoopRunFinished), + Q_MIRROR_ENUM(kCFRunLoopRunStopped), + Q_MIRROR_ENUM(kCFRunLoopRunTimedOut), + Q_MIRROR_ENUM(kCFRunLoopRunHandledSource) + }; +}; + +#define Q_ENUM_PRINTER(enumName) \ + static const char* qPrintable##enumName(int value) \ + { \ + return RunLoopDebugger::staticMetaObject.enumerator(RunLoopDebugger::staticMetaObject.indexOfEnumerator(#enumName)).valueToKey(value); \ + } + +Q_ENUM_PRINTER(Activity); +Q_ENUM_PRINTER(Result); + +QDebug operator<<(QDebug s, timespec tv) +{ + s << tv.tv_sec << "." << qSetFieldWidth(9) << qSetPadChar(QChar(48)) << tv.tv_nsec << reset; + return s; +} + +#if DEBUG_EVENT_DISPATCHER +uint g_eventDispatcherIndentationLevel = 0; +#endif + +static const CFTimeInterval kCFTimeIntervalMinimum = 0; +static const CFTimeInterval kCFTimeIntervalDistantFuture = std::numeric_limits::max(); + +#pragma mark - Class definition + +QEventDispatcherCoreFoundation::QEventDispatcherCoreFoundation(QObject *parent) + : QAbstractEventDispatcher(parent) + , m_processEvents(QEventLoop::EventLoopExec) + , m_postedEventsRunLoopSource(this, &QEventDispatcherCoreFoundation::processPostedEvents) + , m_runLoopActivityObserver(this, &QEventDispatcherCoreFoundation::handleRunLoopActivity, +#if DEBUG_EVENT_DISPATCHER + kCFRunLoopAllActivities +#else + kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting +#endif + ) + , m_runLoopModeTracker([[RunLoopModeTracker alloc] init]) + , m_runLoopTimer(0) + , m_blockedRunLoopTimer(0) + , m_overdueTimerScheduled(false) +{ + m_cfSocketNotifier.setHostEventDispatcher(this); + + m_postedEventsRunLoopSource.addToMode(kCFRunLoopCommonModes); + m_runLoopActivityObserver.addToMode(kCFRunLoopCommonModes); +} + +QEventDispatcherCoreFoundation::~QEventDispatcherCoreFoundation() +{ + invalidateTimer(); + qDeleteAll(m_timerInfoList); + + m_cfSocketNotifier.removeSocketNotifiers(); +} + +/*! + Processes all pending events that match \a flags until there are no + more events to process. Returns \c true if pending events were handled; + otherwise returns \c false. + + Note: + + - All events are considered equal. This function should process + both system/native events (that we may or may not care about), + as well as Qt-events (posted events and timers). + + - The function should not return until all queued/available events + have been processed. If the WaitForMoreEvents is set, the + function should wait only if there were no events ready, + and _then_ process all newly queued/available events. + + These notes apply to other function in this class as well, such as + hasPendingEvents(). +*/ +bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlags flags) +{ + bool eventsProcessed = false; + + if (flags & (QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers)) + qWarning() << "processEvents() flags" << flags << "not supported on iOS"; + + qEventDispatcherDebug() << "Entering with " << flags; qIndent(); + + if (m_blockedRunLoopTimer) { + Q_ASSERT(m_blockedRunLoopTimer == m_runLoopTimer); + + qEventDispatcherDebug() << "Recursing from blocked timer " << m_blockedRunLoopTimer; + m_runLoopTimer = 0; // Unset current timer to force creation of new timer + updateTimers(); + } + + if (m_processEvents.deferredWakeUp) { + // We may be processing events recursivly as a result of processing a posted event, + // in which case we need to signal the run-loop source so that this iteration of + // processEvents will take care of the newly posted events. + m_postedEventsRunLoopSource.signal(); + m_processEvents.deferredWakeUp = false; + + qEventDispatcherDebug() << "Processed deferred wake-up"; + } + + // The documentation states that this signal is emitted after the event + // loop returns from a function that could block, which is not the case + // here, but all the other event dispatchers emit awake at the start of + // processEvents, and the QEventLoop auto-test has an explicit check for + // this behavior, so we assume it's for a good reason and do it as well. + emit awake(); + + ProcessEventsState previousState = m_processEvents; + m_processEvents = ProcessEventsState(flags); + + bool returnAfterSingleSourceHandled = !(m_processEvents.flags & QEventLoop::EventLoopExec); + + Q_FOREVER { + CFStringRef mode = [m_runLoopModeTracker currentMode]; + + CFTimeInterval duration = (m_processEvents.flags & QEventLoop::WaitForMoreEvents) ? + kCFTimeIntervalDistantFuture : kCFTimeIntervalMinimum; + + qEventDispatcherDebug() << "Calling CFRunLoopRunInMode = " << qPrintable(QCFString::toQString(mode)) + << " for " << duration << " ms, processing single source = " << returnAfterSingleSourceHandled; qIndent(); + + SInt32 result = CFRunLoopRunInMode(mode, duration, returnAfterSingleSourceHandled); + + qUnIndent(); qEventDispatcherDebug() << "result = " << qPrintableResult(result); + + eventsProcessed |= (result == kCFRunLoopRunHandledSource + || m_processEvents.processedPostedEvents + || m_processEvents.processedTimers); + + if (result == kCFRunLoopRunFinished) { + // This should only happen at application shutdown, as the main runloop + // will presumably always have sources registered. + break; + } else if (m_processEvents.wasInterrupted) { + + if (m_processEvents.flags & QEventLoop::EventLoopExec) { + Q_ASSERT(result == kCFRunLoopRunStopped); + + // The runloop was potentially stopped (interrupted) by us, as a response to + // a Qt event loop being asked to exit. We check that the topmost eventloop + // is still supposed to keep going and return if not. Note that the runloop + // might get stopped as a result of a non-top eventloop being asked to exit, + // in which case we continue running the top event loop until that is asked + // to exit, and then unwind back to the previous event loop which will break + // immediately, since it has already been exited. + + QEventLoop *currentEventLoop = QThreadData::current()->eventLoops.top(); + Q_ASSERT(currentEventLoop); + + if (!currentEventLoop->isRunning()) { + qEventDispatcherDebug() << "Top level event loop was exited"; + break; + } else { + qEventDispatcherDebug() << "Top level event loop still running, making another pass"; + } + } else { + // We were called manually, through processEvents(), and should stop processing + // events, even if we didn't finish processing all the queued events. + qEventDispatcherDebug() << "Top level processEvents was interrupted"; + break; + } + } + + if (m_processEvents.flags & QEventLoop::EventLoopExec) { + // We were called from QEventLoop's exec(), which blocks until the event + // loop is asked to exit by calling processEvents repeatedly. Instead of + // re-entering this method again and again from QEventLoop, we can block + // here, one lever closer to CFRunLoopRunInMode, by running the native + // event loop again and again until we're interrupted by QEventLoop. + continue; + } else { + // We were called 'manually', through processEvents() + + if (result == kCFRunLoopRunHandledSource) { + // We processed one or more sources, but there might still be other + // sources that did not get a chance to process events, so we need + // to do another pass. + + // But we should only wait for more events the first time + m_processEvents.flags &= ~QEventLoop::WaitForMoreEvents; + continue; + + } else if (m_overdueTimerScheduled && !m_processEvents.processedTimers) { + // CFRunLoopRunInMode does not guarantee that a scheduled timer with a fire + // date in the past (overdue) will fire on the next run loop pass. The Qt + // APIs on the other hand document eg. zero-interval timers to always be + // handled after processing all available window-system events. + qEventDispatcherDebug() << "Manually processing timers due to overdue timer"; + processTimers(0); + eventsProcessed = true; + } + } + + break; + } + + if (m_blockedRunLoopTimer) { + invalidateTimer(); + m_runLoopTimer = m_blockedRunLoopTimer; + } + + if (m_processEvents.deferredUpdateTimers) + updateTimers(); + + if (m_processEvents.deferredWakeUp) { + m_postedEventsRunLoopSource.signal(); + qEventDispatcherDebug() << "Processed deferred wake-up"; + } + + bool wasInterrupted = m_processEvents.wasInterrupted; + + // Restore state of previous processEvents() call + m_processEvents = previousState; + + if (wasInterrupted) { + // The current processEvents run has been interrupted, but there may still be + // others below it (eg, in the case of nested event loops). We need to trigger + // another interrupt so that the parent processEvents call has a chance to check + // if it should continue. + qEventDispatcherDebug() << "Forwarding interrupt in case of nested processEvents"; + interrupt(); + } + + qEventDispatcherDebug() << "Returning with eventsProcessed = " << eventsProcessed; qUnIndent(); + + return eventsProcessed; +} + +bool QEventDispatcherCoreFoundation::processPostedEvents() +{ + if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { + qEventDispatcherDebug() << "Already processed events this pass"; + return false; + } + + m_processEvents.processedPostedEvents = true; + + qEventDispatcherDebug() << "Sending posted events for " << m_processEvents.flags; qIndent(); + QCoreApplication::sendPostedEvents(); + qUnIndent(); + + return true; +} + +void QEventDispatcherCoreFoundation::processTimers(CFRunLoopTimerRef timer) +{ + if (m_processEvents.processedTimers && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { + qEventDispatcherDebug() << "Already processed timers this pass"; + m_processEvents.deferredUpdateTimers = true; + return; + } + + qEventDispatcherDebug() << "CFRunLoopTimer " << timer << " fired, activating Qt timers"; qIndent(); + + // Activating Qt timers might recurse into processEvents() if a timer-callback + // brings up a new event-loop or tries to processes events manually. Although + // a CFRunLoop can recurse inside its callbacks, a single CFRunLoopTimer can + // not. So, for each recursion into processEvents() from a timer-callback we + // need to set up a new timer-source. Instead of doing it preemtivly each + // time we activate Qt timers, we set a flag here, and let processEvents() + // decide whether or not it needs to bring up a new timer source. + + // We may have multiple recused timers, so keep track of the previous blocked timer + CFRunLoopTimerRef previouslyBlockedRunLoopTimer = m_blockedRunLoopTimer; + + m_blockedRunLoopTimer = timer; + m_timerInfoList.activateTimers(); + m_blockedRunLoopTimer = previouslyBlockedRunLoopTimer; + m_processEvents.processedTimers = true; + + qUnIndent(); + + // Now that the timer source is unblocked we may need to schedule it again + updateTimers(); +} + +void QEventDispatcherCoreFoundation::handleRunLoopActivity(CFRunLoopActivity activity) +{ + qEventDispatcherDebug() << qPrintableActivity(activity); + + switch (activity) { + case kCFRunLoopBeforeWaiting: + if (m_processEvents.processedTimers + && !(m_processEvents.flags & QEventLoop::EventLoopExec) + && m_processEvents.flags & QEventLoop::WaitForMoreEvents) { + // CoreFoundation does not treat a timer as a reason to exit CFRunLoopRunInMode + // when asked to only process a single source, so we risk waiting a long time for + // a 'proper' source to fire (typically a system source that we don't control). + // To fix this we do an explicit interrupt after processing our timer, so that + // processEvents() gets a chance to re-evaluate the state of things. + interrupt(); + } + emit aboutToBlock(); + break; + case kCFRunLoopAfterWaiting: + emit awake(); + break; +#if DEBUG_EVENT_DISPATCHER + case kCFRunLoopEntry: + case kCFRunLoopBeforeTimers: + case kCFRunLoopBeforeSources: + case kCFRunLoopExit: + break; +#endif + default: + Q_UNREACHABLE(); + } +} + +bool QEventDispatcherCoreFoundation::hasPendingEvents() +{ + // There doesn't seem to be any API on iOS to peek into the other sources + // to figure out if there are pending non-Qt events. As a workaround, we + // assume that if the run-loop is currently blocking and waiting for a + // source to signal then there are no system-events pending. If this + // function is called from the main thread then the second clause + // of the condition will always be true, as the run loop is + // never waiting in that case. The function would be more aptly named + // 'maybeHasPendingEvents' in our case. + + extern uint qGlobalPostedEventsCount(); + return qGlobalPostedEventsCount() || !CFRunLoopIsWaiting(CFRunLoopGetMain()); +} + +void QEventDispatcherCoreFoundation::wakeUp() +{ + if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { + // A manual processEvents call should only result in processing the events posted + // up until then. Any newly posted events as result of processing existing posted + // events should be handled in the next call to processEvents(). Since we're using + // a run-loop source to process our posted events we need to prevent it from being + // signaled as a result of posting new events, otherwise we end up in an infinite + // loop. We do however need to signal the source at some point, so that the newly + // posted event gets processed on the next processEvents() call, so we flag the + // need to do a deferred wake-up. + m_processEvents.deferredWakeUp = true; + qEventDispatcherDebug() << "Already processed posted events, deferring wakeUp"; + return; + } + + m_postedEventsRunLoopSource.signal(); + CFRunLoopWakeUp(CFRunLoopGetMain()); + + qEventDispatcherDebug() << "Signaled posted event run-loop source"; +} + +void QEventDispatcherCoreFoundation::interrupt() +{ + qEventDispatcherDebug() << "Marking current processEvent as interrupted"; + m_processEvents.wasInterrupted = true; + CFRunLoopStop(CFRunLoopGetMain()); +} + +void QEventDispatcherCoreFoundation::flush() +{ + // X11 only. +} + +#pragma mark - Socket notifiers + +void QEventDispatcherCoreFoundation::registerSocketNotifier(QSocketNotifier *notifier) +{ + m_cfSocketNotifier.registerSocketNotifier(notifier); +} + +void QEventDispatcherCoreFoundation::unregisterSocketNotifier(QSocketNotifier *notifier) +{ + m_cfSocketNotifier.unregisterSocketNotifier(notifier); +} + +#pragma mark - Timers + +void QEventDispatcherCoreFoundation::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) +{ + qEventDispatcherDebug() << "id = " << timerId << ", interval = " << interval + << ", type = " << timerType << ", object = " << object; + + Q_ASSERT(timerId > 0 && interval >= 0 && object); + Q_ASSERT(object->thread() == thread() && thread() == QThread::currentThread()); + + m_timerInfoList.registerTimer(timerId, interval, timerType, object); + updateTimers(); +} + +bool QEventDispatcherCoreFoundation::unregisterTimer(int timerId) +{ + Q_ASSERT(timerId > 0); + Q_ASSERT(thread() == QThread::currentThread()); + + bool returnValue = m_timerInfoList.unregisterTimer(timerId); + + qEventDispatcherDebug() << "id = " << timerId << ", timers left: " << m_timerInfoList.size(); + + updateTimers(); + return returnValue; +} + +bool QEventDispatcherCoreFoundation::unregisterTimers(QObject *object) +{ + Q_ASSERT(object && object->thread() == thread() && thread() == QThread::currentThread()); + + bool returnValue = m_timerInfoList.unregisterTimers(object); + + qEventDispatcherDebug() << "object = " << object << ", timers left: " << m_timerInfoList.size(); + + updateTimers(); + return returnValue; +} + +QList QEventDispatcherCoreFoundation::registeredTimers(QObject *object) const +{ + Q_ASSERT(object); + return m_timerInfoList.registeredTimers(object); +} + +int QEventDispatcherCoreFoundation::remainingTime(int timerId) +{ + Q_ASSERT(timerId > 0); + return m_timerInfoList.timerRemainingTime(timerId); +} + +static double timespecToSeconds(const timespec &spec) +{ + static double nanosecondsPerSecond = 1.0 * 1000 * 1000 * 1000; + return spec.tv_sec + (spec.tv_nsec / nanosecondsPerSecond); +} + +void QEventDispatcherCoreFoundation::updateTimers() +{ + if (m_timerInfoList.size() > 0) { + // We have Qt timers registered, so create or reschedule CF timer to match + + timespec tv = { -1, -1 }; + CFAbsoluteTime timeToFire = m_timerInfoList.timerWait(tv) ? + // We have a timer ready to fire right now, or some time in the future + CFAbsoluteTimeGetCurrent() + timespecToSeconds(tv) + // We have timers, but they are all currently blocked by callbacks + : kCFTimeIntervalDistantFuture; + + if (!m_runLoopTimer) { + m_runLoopTimer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, + timeToFire, kCFTimeIntervalDistantFuture, 0, 0, ^(CFRunLoopTimerRef timer) { + processTimers(timer); + }); + + CFRunLoopAddTimer(CFRunLoopGetMain(), m_runLoopTimer, kCFRunLoopCommonModes); + qEventDispatcherDebug() << "Created new CFRunLoopTimer " << m_runLoopTimer; + + } else { + CFRunLoopTimerSetNextFireDate(m_runLoopTimer, timeToFire); + qEventDispatcherDebug() << "Re-scheduled CFRunLoopTimer " << m_runLoopTimer; + } + + m_overdueTimerScheduled = !timespecToSeconds(tv); + + qEventDispatcherDebug() << "Next timeout in " << tv << " seconds"; + + } else { + // No Qt timers are registered, so make sure we're not running any CF timers + invalidateTimer(); + + m_overdueTimerScheduled = false; + } +} + +void QEventDispatcherCoreFoundation::invalidateTimer() +{ + if (!m_runLoopTimer || (m_runLoopTimer == m_blockedRunLoopTimer)) + return; + + CFRunLoopTimerInvalidate(m_runLoopTimer); + qEventDispatcherDebug() << "Invalidated CFRunLoopTimer " << m_runLoopTimer; + + CFRelease(m_runLoopTimer); + m_runLoopTimer = 0; +} + +#include "qeventdispatcher_cf.moc" +#include "moc_qeventdispatcher_cf_p.cpp" + +QT_END_NAMESPACE diff --git a/src/corelib/kernel/qeventdispatcher_cf_p.h b/src/corelib/kernel/qeventdispatcher_cf_p.h new file mode 100644 index 0000000000..5e8d2f0c85 --- /dev/null +++ b/src/corelib/kernel/qeventdispatcher_cf_p.h @@ -0,0 +1,280 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (c) 2007-2008, Apple, Inc. +** +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are met: +** +** * Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** +** * Neither the name of Apple, Inc. nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +****************************************************************************/ + +#ifndef QEVENTDISPATCHER_CF_P_H +#define QEVENTDISPATCHER_CF_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#define DEBUG_EVENT_DISPATCHER 0 + +#include +#include +#include +#include +#include + +#ifdef __OBJC__ +@class RunLoopModeTracker; +#else +typedef struct objc_object RunLoopModeTracker; +#endif + +QT_BEGIN_NAMESPACE + +class QEventDispatcherCoreFoundation; + +template +class RunLoopSource +{ +public: + typedef bool (T::*CallbackFunction)(); + + enum { kHighestPriority = 0 } RunLoopSourcePriority; + + RunLoopSource(T *delegate, CallbackFunction callback) + : m_delegate(delegate), m_callback(callback) + { + CFRunLoopSourceContext context = {}; + context.info = this; + context.perform = RunLoopSource::process; + + m_source = CFRunLoopSourceCreate(kCFAllocatorDefault, kHighestPriority, &context); + Q_ASSERT(m_source); + } + + ~RunLoopSource() + { + CFRunLoopSourceInvalidate(m_source); + CFRelease(m_source); + } + + void addToMode(CFStringRef mode, CFRunLoopRef runLoop = 0) + { + if (!runLoop) + runLoop = CFRunLoopGetCurrent(); + + CFRunLoopAddSource(runLoop, m_source, mode); + } + + void signal() { CFRunLoopSourceSignal(m_source); } + +private: + static void process(void *info) + { + RunLoopSource *self = static_cast(info); + ((self->m_delegate)->*(self->m_callback))(); + } + + T *m_delegate; + CallbackFunction m_callback; + CFRunLoopSourceRef m_source; +}; + +template +class RunLoopObserver +{ +public: + typedef void (T::*CallbackFunction) (CFRunLoopActivity activity); + + RunLoopObserver(T *delegate, CallbackFunction callback, CFOptionFlags activities) + : m_delegate(delegate), m_callback(callback) + { + CFRunLoopObserverContext context = {}; + context.info = this; + + m_observer = CFRunLoopObserverCreate(kCFAllocatorDefault, activities, true, 0, process, &context); + Q_ASSERT(m_observer); + } + + ~RunLoopObserver() + { + CFRunLoopObserverInvalidate(m_observer); + CFRelease(m_observer); + } + + void addToMode(CFStringRef mode, CFRunLoopRef runLoop = 0) + { + if (!runLoop) + runLoop = CFRunLoopGetCurrent(); + + if (!CFRunLoopContainsObserver(runLoop, m_observer, mode)) + CFRunLoopAddObserver(runLoop, m_observer, mode); + } + + void removeFromMode(CFStringRef mode, CFRunLoopRef runLoop = 0) + { + if (!runLoop) + runLoop = CFRunLoopGetCurrent(); + + if (CFRunLoopContainsObserver(runLoop, m_observer, mode)) + CFRunLoopRemoveObserver(runLoop, m_observer, mode); + } + +private: + static void process(CFRunLoopObserverRef, CFRunLoopActivity activity, void *info) + { + RunLoopObserver *self = static_cast(info); + ((self->m_delegate)->*(self->m_callback))(activity); + } + + T *m_delegate; + CallbackFunction m_callback; + CFRunLoopObserverRef m_observer; +}; + +class Q_CORE_EXPORT QEventDispatcherCoreFoundation : public QAbstractEventDispatcher +{ + Q_OBJECT + +public: + explicit QEventDispatcherCoreFoundation(QObject *parent = 0); + ~QEventDispatcherCoreFoundation(); + + bool processEvents(QEventLoop::ProcessEventsFlags flags); + bool hasPendingEvents(); + + void registerSocketNotifier(QSocketNotifier *notifier); + void unregisterSocketNotifier(QSocketNotifier *notifier); + + void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object); + bool unregisterTimer(int timerId); + bool unregisterTimers(QObject *object); + QList registeredTimers(QObject *object) const; + + int remainingTime(int timerId); + + void wakeUp(); + void interrupt(); + void flush(); + +protected: + virtual bool processPostedEvents(); + + struct ProcessEventsState + { + ProcessEventsState(QEventLoop::ProcessEventsFlags f) + : flags(f), wasInterrupted(false) + , processedPostedEvents(false), processedTimers(false) + , deferredWakeUp(false), deferredUpdateTimers(false) {} + + QEventLoop::ProcessEventsFlags flags; + bool wasInterrupted; + bool processedPostedEvents; + bool processedTimers; + bool deferredWakeUp; + bool deferredUpdateTimers; + }; + + ProcessEventsState m_processEvents; + +private: + RunLoopSource<> m_postedEventsRunLoopSource; + RunLoopObserver<> m_runLoopActivityObserver; + + RunLoopModeTracker *m_runLoopModeTracker; + + QTimerInfoList m_timerInfoList; + CFRunLoopTimerRef m_runLoopTimer; + CFRunLoopTimerRef m_blockedRunLoopTimer; + bool m_overdueTimerScheduled; + + QCFSocketNotifier m_cfSocketNotifier; + + void processTimers(CFRunLoopTimerRef); + + void handleRunLoopActivity(CFRunLoopActivity activity); + + void updateTimers(); + void invalidateTimer(); +}; + +QT_END_NAMESPACE + +#if DEBUG_EVENT_DISPATCHER +extern uint g_eventDispatcherIndentationLevel; +#define qEventDispatcherDebug() qDebug().nospace() \ + << qPrintable(QString(QLatin1String("| ")).repeated(g_eventDispatcherIndentationLevel)) \ + << __FUNCTION__ << "(): " +#define qIndent() ++g_eventDispatcherIndentationLevel +#define qUnIndent() --g_eventDispatcherIndentationLevel +#else +#define qEventDispatcherDebug() QT_NO_QDEBUG_MACRO() +#define qIndent() +#define qUnIndent() +#endif + +#endif // QEVENTDISPATCHER_CF_P_H diff --git a/src/platformsupport/cfsocketnotifier/cfsocketnotifier.pri b/src/platformsupport/cfsocketnotifier/cfsocketnotifier.pri deleted file mode 100644 index 9a19d3c278..0000000000 --- a/src/platformsupport/cfsocketnotifier/cfsocketnotifier.pri +++ /dev/null @@ -1,4 +0,0 @@ -mac { - HEADERS += $$PWD/qcfsocketnotifier_p.h - SOURCES += $$PWD/qcfsocketnotifier.cpp -} diff --git a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp b/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp deleted file mode 100644 index c58e0ea78d..0000000000 --- a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qcfsocketnotifier_p.h" -#include -#include -#include - - -/************************************************************************** - Socket Notifiers - *************************************************************************/ -void qt_mac_socket_callback(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef, - const void *, void *info) -{ - - QCFSocketNotifier *cfSocketNotifier = static_cast(info); - int nativeSocket = CFSocketGetNative(s); - MacSocketInfo *socketInfo = cfSocketNotifier->macSockets.value(nativeSocket); - QEvent notifierEvent(QEvent::SockAct); - - // There is a race condition that happen where we disable the notifier and - // the kernel still has a notification to pass on. We then get this - // notification after we've successfully disabled the CFSocket, but our Qt - // notifier is now gone. The upshot is we have to check the notifier - // every time. - if (callbackType == kCFSocketReadCallBack) { - if (socketInfo->readNotifier && socketInfo->readEnabled) { - socketInfo->readEnabled = false; - QGuiApplication::sendEvent(socketInfo->readNotifier, ¬ifierEvent); - } - } else if (callbackType == kCFSocketWriteCallBack) { - if (socketInfo->writeNotifier && socketInfo->writeEnabled) { - socketInfo->writeEnabled = false; - QGuiApplication::sendEvent(socketInfo->writeNotifier, ¬ifierEvent); - } - } - - if (cfSocketNotifier->maybeCancelWaitForMoreEvents) - cfSocketNotifier->maybeCancelWaitForMoreEvents(cfSocketNotifier->eventDispatcher); -} - -/* - Adds a loop source for the given socket to the current run loop. -*/ -CFRunLoopSourceRef qt_mac_add_socket_to_runloop(const CFSocketRef socket) -{ - CFRunLoopSourceRef loopSource = CFSocketCreateRunLoopSource(kCFAllocatorDefault, socket, 0); - if (!loopSource) - return 0; - - CFRunLoopAddSource(CFRunLoopGetMain(), loopSource, kCFRunLoopCommonModes); - return loopSource; -} - -/* - Removes the loop source for the given socket from the current run loop. -*/ -void qt_mac_remove_socket_from_runloop(const CFSocketRef socket, CFRunLoopSourceRef runloop) -{ - Q_ASSERT(runloop); - CFRunLoopRemoveSource(CFRunLoopGetMain(), runloop, kCFRunLoopCommonModes); - CFSocketDisableCallBacks(socket, kCFSocketReadCallBack); - CFSocketDisableCallBacks(socket, kCFSocketWriteCallBack); -} - -QCFSocketNotifier::QCFSocketNotifier() - : eventDispatcher(0) - , maybeCancelWaitForMoreEvents(0) - , enableNotifiersObserver(0) -{ - -} - -QCFSocketNotifier::~QCFSocketNotifier() -{ - -} - -void QCFSocketNotifier::setHostEventDispatcher(QAbstractEventDispatcher *hostEventDispacher) -{ - eventDispatcher = hostEventDispacher; -} - -void QCFSocketNotifier::setMaybeCancelWaitForMoreEventsCallback(MaybeCancelWaitForMoreEventsFn callBack) -{ - maybeCancelWaitForMoreEvents = callBack; -} - -void QCFSocketNotifier::registerSocketNotifier(QSocketNotifier *notifier) -{ - Q_ASSERT(notifier); - int nativeSocket = notifier->socket(); - int type = notifier->type(); -#ifndef QT_NO_DEBUG - if (nativeSocket < 0 || nativeSocket > FD_SETSIZE) { - qWarning("QSocketNotifier: Internal error"); - return; - } else if (notifier->thread() != eventDispatcher->thread() - || eventDispatcher->thread() != QThread::currentThread()) { - qWarning("QSocketNotifier: socket notifiers cannot be enabled from another thread"); - return; - } -#endif - - if (type == QSocketNotifier::Exception) { - qWarning("QSocketNotifier::Exception is not supported on iOS"); - return; - } - - // Check if we have a CFSocket for the native socket, create one if not. - MacSocketInfo *socketInfo = macSockets.value(nativeSocket); - if (!socketInfo) { - socketInfo = new MacSocketInfo(); - - // Create CFSocket, specify that we want both read and write callbacks (the callbacks - // are enabled/disabled later on). - const int callbackTypes = kCFSocketReadCallBack | kCFSocketWriteCallBack; - CFSocketContext context = {0, this, 0, 0, 0}; - socketInfo->socket = CFSocketCreateWithNative(kCFAllocatorDefault, nativeSocket, callbackTypes, qt_mac_socket_callback, &context); - if (CFSocketIsValid(socketInfo->socket) == false) { - qWarning("QEventDispatcherMac::registerSocketNotifier: Failed to create CFSocket"); - return; - } - - CFOptionFlags flags = CFSocketGetSocketFlags(socketInfo->socket); - // QSocketNotifier doesn't close the socket upon destruction/invalidation - flags &= ~kCFSocketCloseOnInvalidate; - // Expicitly disable automatic re-enable, as we do that manually on each runloop pass - flags &= ~(kCFSocketAutomaticallyReenableWriteCallBack | kCFSocketAutomaticallyReenableReadCallBack); - CFSocketSetSocketFlags(socketInfo->socket, flags); - - macSockets.insert(nativeSocket, socketInfo); - } - - if (type == QSocketNotifier::Read) { - Q_ASSERT(socketInfo->readNotifier == 0); - socketInfo->readNotifier = notifier; - socketInfo->readEnabled = false; - } else if (type == QSocketNotifier::Write) { - Q_ASSERT(socketInfo->writeNotifier == 0); - socketInfo->writeNotifier = notifier; - socketInfo->writeEnabled = false; - } - - if (!enableNotifiersObserver) { - // Create a run loop observer which enables the socket notifiers on each - // pass of the run loop, before any sources are processed. - CFRunLoopObserverContext context = {}; - context.info = this; - enableNotifiersObserver = CFRunLoopObserverCreate(kCFAllocatorDefault, kCFRunLoopBeforeSources, - true, 0, enableSocketNotifiers, &context); - Q_ASSERT(enableNotifiersObserver); - CFRunLoopAddObserver(CFRunLoopGetMain(), enableNotifiersObserver, kCFRunLoopCommonModes); - } -} - -void QCFSocketNotifier::unregisterSocketNotifier(QSocketNotifier *notifier) -{ - Q_ASSERT(notifier); - int nativeSocket = notifier->socket(); - int type = notifier->type(); -#ifndef QT_NO_DEBUG - if (nativeSocket < 0 || nativeSocket > FD_SETSIZE) { - qWarning("QSocketNotifier: Internal error"); - return; - } else if (notifier->thread() != eventDispatcher->thread() || eventDispatcher->thread() != QThread::currentThread()) { - qWarning("QSocketNotifier: socket notifiers cannot be disabled from another thread"); - return; - } -#endif - - if (type == QSocketNotifier::Exception) { - qWarning("QSocketNotifier::Exception is not supported on iOS"); - return; - } - MacSocketInfo *socketInfo = macSockets.value(nativeSocket); - if (!socketInfo) { - qWarning("QEventDispatcherMac::unregisterSocketNotifier: Tried to unregister a not registered notifier"); - return; - } - - // Decrement read/write counters and disable callbacks if necessary. - if (type == QSocketNotifier::Read) { - Q_ASSERT(notifier == socketInfo->readNotifier); - socketInfo->readNotifier = 0; - socketInfo->readEnabled = false; - CFSocketDisableCallBacks(socketInfo->socket, kCFSocketReadCallBack); - } else if (type == QSocketNotifier::Write) { - Q_ASSERT(notifier == socketInfo->writeNotifier); - socketInfo->writeNotifier = 0; - socketInfo->writeEnabled = false; - CFSocketDisableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); - } - - // Remove CFSocket from runloop if this was the last QSocketNotifier. - if (socketInfo->readNotifier == 0 && socketInfo->writeNotifier == 0) { - unregisterSocketInfo(socketInfo); - delete socketInfo; - macSockets.remove(nativeSocket); - } -} - -void QCFSocketNotifier::removeSocketNotifiers() -{ - // Remove CFSockets from the runloop. - foreach (MacSocketInfo *socketInfo, macSockets) { - unregisterSocketInfo(socketInfo); - delete socketInfo; - } - - macSockets.clear(); - - destroyRunLoopObserver(); -} - -void QCFSocketNotifier::destroyRunLoopObserver() -{ - if (!enableNotifiersObserver) - return; - - CFRunLoopObserverInvalidate(enableNotifiersObserver); - CFRelease(enableNotifiersObserver); - enableNotifiersObserver = 0; -} - -void QCFSocketNotifier::unregisterSocketInfo(MacSocketInfo *socketInfo) -{ - if (socketInfo->runloop) { - if (CFSocketIsValid(socketInfo->socket)) - qt_mac_remove_socket_from_runloop(socketInfo->socket, socketInfo->runloop); - CFRunLoopSourceInvalidate(socketInfo->runloop); - CFRelease(socketInfo->runloop); - } - CFSocketInvalidate(socketInfo->socket); - CFRelease(socketInfo->socket); -} - -void QCFSocketNotifier::enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info) -{ - Q_UNUSED(ref); - Q_UNUSED(activity); - - QCFSocketNotifier *that = static_cast(info); - - foreach (MacSocketInfo *socketInfo, that->macSockets) { - if (!CFSocketIsValid(socketInfo->socket)) - continue; - - if (!socketInfo->runloop) { - // Add CFSocket to runloop. - if (!(socketInfo->runloop = qt_mac_add_socket_to_runloop(socketInfo->socket))) { - qWarning("QEventDispatcherMac::registerSocketNotifier: Failed to add CFSocket to runloop"); - CFSocketInvalidate(socketInfo->socket); - continue; - } - - if (!socketInfo->readNotifier) - CFSocketDisableCallBacks(socketInfo->socket, kCFSocketReadCallBack); - if (!socketInfo->writeNotifier) - CFSocketDisableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); - } - - if (socketInfo->readNotifier && !socketInfo->readEnabled) { - socketInfo->readEnabled = true; - CFSocketEnableCallBacks(socketInfo->socket, kCFSocketReadCallBack); - } - if (socketInfo->writeNotifier && !socketInfo->writeEnabled) { - socketInfo->writeEnabled = true; - CFSocketEnableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); - } - } -} diff --git a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier_p.h b/src/platformsupport/cfsocketnotifier/qcfsocketnotifier_p.h deleted file mode 100644 index 9bccc1bf98..0000000000 --- a/src/platformsupport/cfsocketnotifier/qcfsocketnotifier_p.h +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QCFSOCKETNOTIFIER_P_H -#define QCFSOCKETNOTIFIER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -#include - -QT_BEGIN_NAMESPACE - -struct MacSocketInfo { - MacSocketInfo() : socket(0), runloop(0), readNotifier(0), writeNotifier(0), - readEnabled(false), writeEnabled(false) {} - CFSocketRef socket; - CFRunLoopSourceRef runloop; - QObject *readNotifier; - QObject *writeNotifier; - bool readEnabled; - bool writeEnabled; -}; -typedef QHash MacSocketHash; - -typedef void (*MaybeCancelWaitForMoreEventsFn)(QAbstractEventDispatcher *hostEventDispacher); - -// The CoreFoundationSocketNotifier class implements socket notifiers support using -// CFSocket for event dispatchers running on top of the Core Foundation run loop system. -// (currently Mac and iOS) -// -// The principal functions are registerSocketNotifier() and unregisterSocketNotifier(). -// -// setHostEventDispatcher() should be called at startup. -// removeSocketNotifiers() should be called at shutdown. -// -class QCFSocketNotifier -{ -public: - QCFSocketNotifier(); - ~QCFSocketNotifier(); - void setHostEventDispatcher(QAbstractEventDispatcher *hostEventDispacher); - void setMaybeCancelWaitForMoreEventsCallback(MaybeCancelWaitForMoreEventsFn callBack); - void registerSocketNotifier(QSocketNotifier *notifier); - void unregisterSocketNotifier(QSocketNotifier *notifier); - void removeSocketNotifiers(); - -private: - void destroyRunLoopObserver(); - - static void unregisterSocketInfo(MacSocketInfo *socketInfo); - static void enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoopActivity activity, void *info); - - MacSocketHash macSockets; - QAbstractEventDispatcher *eventDispatcher; - MaybeCancelWaitForMoreEventsFn maybeCancelWaitForMoreEvents; - CFRunLoopObserverRef enableNotifiersObserver; - - friend void qt_mac_socket_callback(CFSocketRef, CFSocketCallBackType, CFDataRef, const void *, void *); -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pri b/src/platformsupport/eventdispatchers/eventdispatchers.pri index c9bbe1f5b7..6e16a46b34 100644 --- a/src/platformsupport/eventdispatchers/eventdispatchers.pri +++ b/src/platformsupport/eventdispatchers/eventdispatchers.pri @@ -8,14 +8,6 @@ HEADERS +=\ $$PWD/qgenericunixeventdispatcher_p.h\ } -ios { -OBJECTIVE_SOURCES +=\ - $$PWD/qeventdispatcher_cf.mm - -HEADERS +=\ - $$PWD/qeventdispatcher_cf_p.h -} - contains(QT_CONFIG, glib) { SOURCES +=$$PWD/qeventdispatcher_glib.cpp HEADERS +=$$PWD/qeventdispatcher_glib_p.h diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm b/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm deleted file mode 100644 index 0273fe5ed4..0000000000 --- a/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm +++ /dev/null @@ -1,624 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qeventdispatcher_cf_p.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -@interface RunLoopModeTracker : NSObject { - QStack m_runLoopModes; -} -@end - -@implementation RunLoopModeTracker - -- (id) init -{ - if (self = [super init]) { - m_runLoopModes.push(kCFRunLoopDefaultMode); - - [[NSNotificationCenter defaultCenter] - addObserver:self - selector:@selector(receivedNotification:) - name:nil - object:[UIApplication sharedApplication]]; - } - - return self; -} - -- (void) dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [super dealloc]; -} - -static CFStringRef runLoopMode(NSDictionary *dictionary) -{ - for (NSString *key in dictionary) { - if (CFStringHasSuffix((CFStringRef)key, CFSTR("RunLoopMode"))) - return (CFStringRef)[dictionary objectForKey: key]; - } - - return nil; -} - -- (void) receivedNotification:(NSNotification *) notification -{ - if (CFStringHasSuffix((CFStringRef)notification.name, CFSTR("RunLoopModePushNotification"))) { - if (CFStringRef mode = runLoopMode(notification.userInfo)) - m_runLoopModes.push(mode); - else - qWarning("Encountered run loop push notification without run loop mode!"); - - } else if (CFStringHasSuffix((CFStringRef)notification.name, CFSTR("RunLoopModePopNotification"))) { - CFStringRef mode = runLoopMode(notification.userInfo); - if (CFStringCompare(mode, [self currentMode], 0) == kCFCompareEqualTo) - m_runLoopModes.pop(); - else - qWarning("Tried to pop run loop mode '%s' that was never pushed!", qPrintable(QCFString::toQString(mode))); - - Q_ASSERT(m_runLoopModes.size() >= 1); - } -} - -- (CFStringRef) currentMode -{ - return m_runLoopModes.top(); -} - -@end - -QT_BEGIN_NAMESPACE -QT_USE_NAMESPACE - -class RunLoopDebugger : public QObject -{ - Q_OBJECT - - Q_ENUMS(Activity) - Q_ENUMS(Result) - -public: - - #define Q_MIRROR_ENUM(name) name = name - - enum Activity { - Q_MIRROR_ENUM(kCFRunLoopEntry), - Q_MIRROR_ENUM(kCFRunLoopBeforeTimers), - Q_MIRROR_ENUM(kCFRunLoopBeforeSources), - Q_MIRROR_ENUM(kCFRunLoopBeforeWaiting), - Q_MIRROR_ENUM(kCFRunLoopAfterWaiting), - Q_MIRROR_ENUM(kCFRunLoopExit) - }; - - enum Result { - Q_MIRROR_ENUM(kCFRunLoopRunFinished), - Q_MIRROR_ENUM(kCFRunLoopRunStopped), - Q_MIRROR_ENUM(kCFRunLoopRunTimedOut), - Q_MIRROR_ENUM(kCFRunLoopRunHandledSource) - }; -}; - -#define Q_ENUM_PRINTER(enumName) \ - static const char* qPrintable##enumName(int value) \ - { \ - return RunLoopDebugger::staticMetaObject.enumerator(RunLoopDebugger::staticMetaObject.indexOfEnumerator(#enumName)).valueToKey(value); \ - } - -Q_ENUM_PRINTER(Activity); -Q_ENUM_PRINTER(Result); - -QDebug operator<<(QDebug s, timespec tv) -{ - s << tv.tv_sec << "." << qSetFieldWidth(9) << qSetPadChar(QChar(48)) << tv.tv_nsec << reset; - return s; -} - -#if DEBUG_EVENT_DISPATCHER -uint g_eventDispatcherIndentationLevel = 0; -#endif - -static const CFTimeInterval kCFTimeIntervalMinimum = 0; -static const CFTimeInterval kCFTimeIntervalDistantFuture = std::numeric_limits::max(); - -#pragma mark - Class definition - -QEventDispatcherCoreFoundation::QEventDispatcherCoreFoundation(QObject *parent) - : QAbstractEventDispatcher(parent) - , m_processEvents(QEventLoop::EventLoopExec) - , m_postedEventsRunLoopSource(this, &QEventDispatcherCoreFoundation::processPostedEvents) - , m_runLoopActivityObserver(this, &QEventDispatcherCoreFoundation::handleRunLoopActivity, -#if DEBUG_EVENT_DISPATCHER - kCFRunLoopAllActivities -#else - kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting -#endif - ) - , m_runLoopModeTracker([[RunLoopModeTracker alloc] init]) - , m_runLoopTimer(0) - , m_blockedRunLoopTimer(0) - , m_overdueTimerScheduled(false) -{ - m_cfSocketNotifier.setHostEventDispatcher(this); - - m_postedEventsRunLoopSource.addToMode(kCFRunLoopCommonModes); - m_runLoopActivityObserver.addToMode(kCFRunLoopCommonModes); -} - -QEventDispatcherCoreFoundation::~QEventDispatcherCoreFoundation() -{ - invalidateTimer(); - qDeleteAll(m_timerInfoList); - - m_cfSocketNotifier.removeSocketNotifiers(); -} - -/*! - Processes all pending events that match \a flags until there are no - more events to process. Returns \c true if pending events were handled; - otherwise returns \c false. - - Note: - - - All events are considered equal. This function should process - both system/native events (that we may or may not care about), - as well as Qt-events (posted events and timers). - - - The function should not return until all queued/available events - have been processed. If the WaitForMoreEvents is set, the - function should wait only if there were no events ready, - and _then_ process all newly queued/available events. - - These notes apply to other function in this class as well, such as - hasPendingEvents(). -*/ -bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlags flags) -{ - bool eventsProcessed = false; - - if (flags & (QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers)) - qWarning() << "processEvents() flags" << flags << "not supported on iOS"; - - qEventDispatcherDebug() << "Entering with " << flags; qIndent(); - - if (m_blockedRunLoopTimer) { - Q_ASSERT(m_blockedRunLoopTimer == m_runLoopTimer); - - qEventDispatcherDebug() << "Recursing from blocked timer " << m_blockedRunLoopTimer; - m_runLoopTimer = 0; // Unset current timer to force creation of new timer - updateTimers(); - } - - if (m_processEvents.deferredWakeUp) { - // We may be processing events recursivly as a result of processing a posted event, - // in which case we need to signal the run-loop source so that this iteration of - // processEvents will take care of the newly posted events. - m_postedEventsRunLoopSource.signal(); - m_processEvents.deferredWakeUp = false; - - qEventDispatcherDebug() << "Processed deferred wake-up"; - } - - // The documentation states that this signal is emitted after the event - // loop returns from a function that could block, which is not the case - // here, but all the other event dispatchers emit awake at the start of - // processEvents, and the QEventLoop auto-test has an explicit check for - // this behavior, so we assume it's for a good reason and do it as well. - emit awake(); - - ProcessEventsState previousState = m_processEvents; - m_processEvents = ProcessEventsState(flags); - - bool returnAfterSingleSourceHandled = !(m_processEvents.flags & QEventLoop::EventLoopExec); - - Q_FOREVER { - CFStringRef mode = [m_runLoopModeTracker currentMode]; - - CFTimeInterval duration = (m_processEvents.flags & QEventLoop::WaitForMoreEvents) ? - kCFTimeIntervalDistantFuture : kCFTimeIntervalMinimum; - - qEventDispatcherDebug() << "Calling CFRunLoopRunInMode = " << qPrintable(QCFString::toQString(mode)) - << " for " << duration << " ms, processing single source = " << returnAfterSingleSourceHandled; qIndent(); - - SInt32 result = CFRunLoopRunInMode(mode, duration, returnAfterSingleSourceHandled); - - qUnIndent(); qEventDispatcherDebug() << "result = " << qPrintableResult(result); - - eventsProcessed |= (result == kCFRunLoopRunHandledSource - || m_processEvents.processedPostedEvents - || m_processEvents.processedTimers); - - if (result == kCFRunLoopRunFinished) { - // This should only happen at application shutdown, as the main runloop - // will presumably always have sources registered. - break; - } else if (m_processEvents.wasInterrupted) { - - if (m_processEvents.flags & QEventLoop::EventLoopExec) { - Q_ASSERT(result == kCFRunLoopRunStopped); - - // The runloop was potentially stopped (interrupted) by us, as a response to - // a Qt event loop being asked to exit. We check that the topmost eventloop - // is still supposed to keep going and return if not. Note that the runloop - // might get stopped as a result of a non-top eventloop being asked to exit, - // in which case we continue running the top event loop until that is asked - // to exit, and then unwind back to the previous event loop which will break - // immediately, since it has already been exited. - - QEventLoop *currentEventLoop = QThreadData::current()->eventLoops.top(); - Q_ASSERT(currentEventLoop); - - if (!currentEventLoop->isRunning()) { - qEventDispatcherDebug() << "Top level event loop was exited"; - break; - } else { - qEventDispatcherDebug() << "Top level event loop still running, making another pass"; - } - } else { - // We were called manually, through processEvents(), and should stop processing - // events, even if we didn't finish processing all the queued events. - qEventDispatcherDebug() << "Top level processEvents was interrupted"; - break; - } - } - - if (m_processEvents.flags & QEventLoop::EventLoopExec) { - // We were called from QEventLoop's exec(), which blocks until the event - // loop is asked to exit by calling processEvents repeatedly. Instead of - // re-entering this method again and again from QEventLoop, we can block - // here, one lever closer to CFRunLoopRunInMode, by running the native - // event loop again and again until we're interrupted by QEventLoop. - continue; - } else { - // We were called 'manually', through processEvents() - - if (result == kCFRunLoopRunHandledSource) { - // We processed one or more sources, but there might still be other - // sources that did not get a chance to process events, so we need - // to do another pass. - - // But we should only wait for more events the first time - m_processEvents.flags &= ~QEventLoop::WaitForMoreEvents; - continue; - - } else if (m_overdueTimerScheduled && !m_processEvents.processedTimers) { - // CFRunLoopRunInMode does not guarantee that a scheduled timer with a fire - // date in the past (overdue) will fire on the next run loop pass. The Qt - // APIs on the other hand document eg. zero-interval timers to always be - // handled after processing all available window-system events. - qEventDispatcherDebug() << "Manually processing timers due to overdue timer"; - processTimers(0); - eventsProcessed = true; - } - } - - break; - } - - if (m_blockedRunLoopTimer) { - invalidateTimer(); - m_runLoopTimer = m_blockedRunLoopTimer; - } - - if (m_processEvents.deferredUpdateTimers) - updateTimers(); - - if (m_processEvents.deferredWakeUp) { - m_postedEventsRunLoopSource.signal(); - qEventDispatcherDebug() << "Processed deferred wake-up"; - } - - bool wasInterrupted = m_processEvents.wasInterrupted; - - // Restore state of previous processEvents() call - m_processEvents = previousState; - - if (wasInterrupted) { - // The current processEvents run has been interrupted, but there may still be - // others below it (eg, in the case of nested event loops). We need to trigger - // another interrupt so that the parent processEvents call has a chance to check - // if it should continue. - qEventDispatcherDebug() << "Forwarding interrupt in case of nested processEvents"; - interrupt(); - } - - qEventDispatcherDebug() << "Returning with eventsProcessed = " << eventsProcessed; qUnIndent(); - - return eventsProcessed; -} - -bool QEventDispatcherCoreFoundation::processPostedEvents() -{ - if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { - qEventDispatcherDebug() << "Already processed events this pass"; - return false; - } - - m_processEvents.processedPostedEvents = true; - - qEventDispatcherDebug() << "Sending posted events for " << m_processEvents.flags; qIndent(); - QCoreApplication::sendPostedEvents(); - qUnIndent(); - - return true; -} - -void QEventDispatcherCoreFoundation::processTimers(CFRunLoopTimerRef timer) -{ - if (m_processEvents.processedTimers && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { - qEventDispatcherDebug() << "Already processed timers this pass"; - m_processEvents.deferredUpdateTimers = true; - return; - } - - qEventDispatcherDebug() << "CFRunLoopTimer " << timer << " fired, activating Qt timers"; qIndent(); - - // Activating Qt timers might recurse into processEvents() if a timer-callback - // brings up a new event-loop or tries to processes events manually. Although - // a CFRunLoop can recurse inside its callbacks, a single CFRunLoopTimer can - // not. So, for each recursion into processEvents() from a timer-callback we - // need to set up a new timer-source. Instead of doing it preemtivly each - // time we activate Qt timers, we set a flag here, and let processEvents() - // decide whether or not it needs to bring up a new timer source. - - // We may have multiple recused timers, so keep track of the previous blocked timer - CFRunLoopTimerRef previouslyBlockedRunLoopTimer = m_blockedRunLoopTimer; - - m_blockedRunLoopTimer = timer; - m_timerInfoList.activateTimers(); - m_blockedRunLoopTimer = previouslyBlockedRunLoopTimer; - m_processEvents.processedTimers = true; - - qUnIndent(); - - // Now that the timer source is unblocked we may need to schedule it again - updateTimers(); -} - -void QEventDispatcherCoreFoundation::handleRunLoopActivity(CFRunLoopActivity activity) -{ - qEventDispatcherDebug() << qPrintableActivity(activity); - - switch (activity) { - case kCFRunLoopBeforeWaiting: - if (m_processEvents.processedTimers - && !(m_processEvents.flags & QEventLoop::EventLoopExec) - && m_processEvents.flags & QEventLoop::WaitForMoreEvents) { - // CoreFoundation does not treat a timer as a reason to exit CFRunLoopRunInMode - // when asked to only process a single source, so we risk waiting a long time for - // a 'proper' source to fire (typically a system source that we don't control). - // To fix this we do an explicit interrupt after processing our timer, so that - // processEvents() gets a chance to re-evaluate the state of things. - interrupt(); - } - emit aboutToBlock(); - break; - case kCFRunLoopAfterWaiting: - emit awake(); - break; -#if DEBUG_EVENT_DISPATCHER - case kCFRunLoopEntry: - case kCFRunLoopBeforeTimers: - case kCFRunLoopBeforeSources: - case kCFRunLoopExit: - break; -#endif - default: - Q_UNREACHABLE(); - } -} - -bool QEventDispatcherCoreFoundation::hasPendingEvents() -{ - // There doesn't seem to be any API on iOS to peek into the other sources - // to figure out if there are pending non-Qt events. As a workaround, we - // assume that if the run-loop is currently blocking and waiting for a - // source to signal then there are no system-events pending. If this - // function is called from the main thread then the second clause - // of the condition will always be true, as the run loop is - // never waiting in that case. The function would be more aptly named - // 'maybeHasPendingEvents' in our case. - - extern uint qGlobalPostedEventsCount(); - return qGlobalPostedEventsCount() || !CFRunLoopIsWaiting(CFRunLoopGetMain()); -} - -void QEventDispatcherCoreFoundation::wakeUp() -{ - if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { - // A manual processEvents call should only result in processing the events posted - // up until then. Any newly posted events as result of processing existing posted - // events should be handled in the next call to processEvents(). Since we're using - // a run-loop source to process our posted events we need to prevent it from being - // signaled as a result of posting new events, otherwise we end up in an infinite - // loop. We do however need to signal the source at some point, so that the newly - // posted event gets processed on the next processEvents() call, so we flag the - // need to do a deferred wake-up. - m_processEvents.deferredWakeUp = true; - qEventDispatcherDebug() << "Already processed posted events, deferring wakeUp"; - return; - } - - m_postedEventsRunLoopSource.signal(); - CFRunLoopWakeUp(CFRunLoopGetMain()); - - qEventDispatcherDebug() << "Signaled posted event run-loop source"; -} - -void QEventDispatcherCoreFoundation::interrupt() -{ - qEventDispatcherDebug() << "Marking current processEvent as interrupted"; - m_processEvents.wasInterrupted = true; - CFRunLoopStop(CFRunLoopGetMain()); -} - -void QEventDispatcherCoreFoundation::flush() -{ - // X11 only. -} - -#pragma mark - Socket notifiers - -void QEventDispatcherCoreFoundation::registerSocketNotifier(QSocketNotifier *notifier) -{ - m_cfSocketNotifier.registerSocketNotifier(notifier); -} - -void QEventDispatcherCoreFoundation::unregisterSocketNotifier(QSocketNotifier *notifier) -{ - m_cfSocketNotifier.unregisterSocketNotifier(notifier); -} - -#pragma mark - Timers - -void QEventDispatcherCoreFoundation::registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object) -{ - qEventDispatcherDebug() << "id = " << timerId << ", interval = " << interval - << ", type = " << timerType << ", object = " << object; - - Q_ASSERT(timerId > 0 && interval >= 0 && object); - Q_ASSERT(object->thread() == thread() && thread() == QThread::currentThread()); - - m_timerInfoList.registerTimer(timerId, interval, timerType, object); - updateTimers(); -} - -bool QEventDispatcherCoreFoundation::unregisterTimer(int timerId) -{ - Q_ASSERT(timerId > 0); - Q_ASSERT(thread() == QThread::currentThread()); - - bool returnValue = m_timerInfoList.unregisterTimer(timerId); - - qEventDispatcherDebug() << "id = " << timerId << ", timers left: " << m_timerInfoList.size(); - - updateTimers(); - return returnValue; -} - -bool QEventDispatcherCoreFoundation::unregisterTimers(QObject *object) -{ - Q_ASSERT(object && object->thread() == thread() && thread() == QThread::currentThread()); - - bool returnValue = m_timerInfoList.unregisterTimers(object); - - qEventDispatcherDebug() << "object = " << object << ", timers left: " << m_timerInfoList.size(); - - updateTimers(); - return returnValue; -} - -QList QEventDispatcherCoreFoundation::registeredTimers(QObject *object) const -{ - Q_ASSERT(object); - return m_timerInfoList.registeredTimers(object); -} - -int QEventDispatcherCoreFoundation::remainingTime(int timerId) -{ - Q_ASSERT(timerId > 0); - return m_timerInfoList.timerRemainingTime(timerId); -} - -static double timespecToSeconds(const timespec &spec) -{ - static double nanosecondsPerSecond = 1.0 * 1000 * 1000 * 1000; - return spec.tv_sec + (spec.tv_nsec / nanosecondsPerSecond); -} - -void QEventDispatcherCoreFoundation::updateTimers() -{ - if (m_timerInfoList.size() > 0) { - // We have Qt timers registered, so create or reschedule CF timer to match - - timespec tv = { -1, -1 }; - CFAbsoluteTime timeToFire = m_timerInfoList.timerWait(tv) ? - // We have a timer ready to fire right now, or some time in the future - CFAbsoluteTimeGetCurrent() + timespecToSeconds(tv) - // We have timers, but they are all currently blocked by callbacks - : kCFTimeIntervalDistantFuture; - - if (!m_runLoopTimer) { - m_runLoopTimer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, - timeToFire, kCFTimeIntervalDistantFuture, 0, 0, ^(CFRunLoopTimerRef timer) { - processTimers(timer); - }); - - CFRunLoopAddTimer(CFRunLoopGetMain(), m_runLoopTimer, kCFRunLoopCommonModes); - qEventDispatcherDebug() << "Created new CFRunLoopTimer " << m_runLoopTimer; - - } else { - CFRunLoopTimerSetNextFireDate(m_runLoopTimer, timeToFire); - qEventDispatcherDebug() << "Re-scheduled CFRunLoopTimer " << m_runLoopTimer; - } - - m_overdueTimerScheduled = !timespecToSeconds(tv); - - qEventDispatcherDebug() << "Next timeout in " << tv << " seconds"; - - } else { - // No Qt timers are registered, so make sure we're not running any CF timers - invalidateTimer(); - - m_overdueTimerScheduled = false; - } -} - -void QEventDispatcherCoreFoundation::invalidateTimer() -{ - if (!m_runLoopTimer || (m_runLoopTimer == m_blockedRunLoopTimer)) - return; - - CFRunLoopTimerInvalidate(m_runLoopTimer); - qEventDispatcherDebug() << "Invalidated CFRunLoopTimer " << m_runLoopTimer; - - CFRelease(m_runLoopTimer); - m_runLoopTimer = 0; -} - -#include "qeventdispatcher_cf.moc" -#include "moc_qeventdispatcher_cf_p.cpp" - -QT_END_NAMESPACE diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_cf_p.h b/src/platformsupport/eventdispatchers/qeventdispatcher_cf_p.h deleted file mode 100644 index 2fe5dea3d8..0000000000 --- a/src/platformsupport/eventdispatchers/qeventdispatcher_cf_p.h +++ /dev/null @@ -1,280 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (c) 2007-2008, Apple, Inc. -** -** All rights reserved. -** -** Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are met: -** -** * Redistributions of source code must retain the above copyright notice, -** this list of conditions and the following disclaimer. -** -** * Redistributions in binary form must reproduce the above copyright notice, -** this list of conditions and the following disclaimer in the documentation -** and/or other materials provided with the distribution. -** -** * Neither the name of Apple, Inc. nor the names of its contributors -** may be used to endorse or promote products derived from this software -** without specific prior written permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -** -****************************************************************************/ - -#ifndef QEVENTDISPATCHER_CF_P_H -#define QEVENTDISPATCHER_CF_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#define DEBUG_EVENT_DISPATCHER 0 - -#include -#include -#include -#include -#include - -#ifdef __OBJC__ -@class RunLoopModeTracker; -#else -typedef struct objc_object RunLoopModeTracker; -#endif - -QT_BEGIN_NAMESPACE - -class QEventDispatcherCoreFoundation; - -template -class RunLoopSource -{ -public: - typedef bool (T::*CallbackFunction)(); - - enum { kHighestPriority = 0 } RunLoopSourcePriority; - - RunLoopSource(T *delegate, CallbackFunction callback) - : m_delegate(delegate), m_callback(callback) - { - CFRunLoopSourceContext context = {}; - context.info = this; - context.perform = RunLoopSource::process; - - m_source = CFRunLoopSourceCreate(kCFAllocatorDefault, kHighestPriority, &context); - Q_ASSERT(m_source); - } - - ~RunLoopSource() - { - CFRunLoopSourceInvalidate(m_source); - CFRelease(m_source); - } - - void addToMode(CFStringRef mode, CFRunLoopRef runLoop = 0) - { - if (!runLoop) - runLoop = CFRunLoopGetCurrent(); - - CFRunLoopAddSource(runLoop, m_source, mode); - } - - void signal() { CFRunLoopSourceSignal(m_source); } - -private: - static void process(void *info) - { - RunLoopSource *self = static_cast(info); - ((self->m_delegate)->*(self->m_callback))(); - } - - T *m_delegate; - CallbackFunction m_callback; - CFRunLoopSourceRef m_source; -}; - -template -class RunLoopObserver -{ -public: - typedef void (T::*CallbackFunction) (CFRunLoopActivity activity); - - RunLoopObserver(T *delegate, CallbackFunction callback, CFOptionFlags activities) - : m_delegate(delegate), m_callback(callback) - { - CFRunLoopObserverContext context = {}; - context.info = this; - - m_observer = CFRunLoopObserverCreate(kCFAllocatorDefault, activities, true, 0, process, &context); - Q_ASSERT(m_observer); - } - - ~RunLoopObserver() - { - CFRunLoopObserverInvalidate(m_observer); - CFRelease(m_observer); - } - - void addToMode(CFStringRef mode, CFRunLoopRef runLoop = 0) - { - if (!runLoop) - runLoop = CFRunLoopGetCurrent(); - - if (!CFRunLoopContainsObserver(runLoop, m_observer, mode)) - CFRunLoopAddObserver(runLoop, m_observer, mode); - } - - void removeFromMode(CFStringRef mode, CFRunLoopRef runLoop = 0) - { - if (!runLoop) - runLoop = CFRunLoopGetCurrent(); - - if (CFRunLoopContainsObserver(runLoop, m_observer, mode)) - CFRunLoopRemoveObserver(runLoop, m_observer, mode); - } - -private: - static void process(CFRunLoopObserverRef, CFRunLoopActivity activity, void *info) - { - RunLoopObserver *self = static_cast(info); - ((self->m_delegate)->*(self->m_callback))(activity); - } - - T *m_delegate; - CallbackFunction m_callback; - CFRunLoopObserverRef m_observer; -}; - -class QEventDispatcherCoreFoundation : public QAbstractEventDispatcher -{ - Q_OBJECT - -public: - explicit QEventDispatcherCoreFoundation(QObject *parent = 0); - ~QEventDispatcherCoreFoundation(); - - bool processEvents(QEventLoop::ProcessEventsFlags flags); - bool hasPendingEvents(); - - void registerSocketNotifier(QSocketNotifier *notifier); - void unregisterSocketNotifier(QSocketNotifier *notifier); - - void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject *object); - bool unregisterTimer(int timerId); - bool unregisterTimers(QObject *object); - QList registeredTimers(QObject *object) const; - - int remainingTime(int timerId); - - void wakeUp(); - void interrupt(); - void flush(); - -protected: - virtual bool processPostedEvents(); - - struct ProcessEventsState - { - ProcessEventsState(QEventLoop::ProcessEventsFlags f) - : flags(f), wasInterrupted(false) - , processedPostedEvents(false), processedTimers(false) - , deferredWakeUp(false), deferredUpdateTimers(false) {} - - QEventLoop::ProcessEventsFlags flags; - bool wasInterrupted; - bool processedPostedEvents; - bool processedTimers; - bool deferredWakeUp; - bool deferredUpdateTimers; - }; - - ProcessEventsState m_processEvents; - -private: - RunLoopSource<> m_postedEventsRunLoopSource; - RunLoopObserver<> m_runLoopActivityObserver; - - RunLoopModeTracker *m_runLoopModeTracker; - - QTimerInfoList m_timerInfoList; - CFRunLoopTimerRef m_runLoopTimer; - CFRunLoopTimerRef m_blockedRunLoopTimer; - bool m_overdueTimerScheduled; - - QCFSocketNotifier m_cfSocketNotifier; - - void processTimers(CFRunLoopTimerRef); - - void handleRunLoopActivity(CFRunLoopActivity activity); - - void updateTimers(); - void invalidateTimer(); -}; - -QT_END_NAMESPACE - -#if DEBUG_EVENT_DISPATCHER -extern uint g_eventDispatcherIndentationLevel; -#define qEventDispatcherDebug() qDebug().nospace() \ - << qPrintable(QString(QLatin1String("| ")).repeated(g_eventDispatcherIndentationLevel)) \ - << __FUNCTION__ << "(): " -#define qIndent() ++g_eventDispatcherIndentationLevel -#define qUnIndent() --g_eventDispatcherIndentationLevel -#else -#define qEventDispatcherDebug() QT_NO_QDEBUG_MACRO() -#define qIndent() -#define qUnIndent() -#endif - -#endif // QEVENTDISPATCHER_CF_P_H diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 34e2ed3c9b..1ea6d0eb69 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -7,7 +7,6 @@ mac:LIBS_PRIVATE += -lz DEFINES += QT_NO_CAST_FROM_ASCII PRECOMPILED_HEADER = ../corelib/global/qt_pch.h -include(cfsocketnotifier/cfsocketnotifier.pri) include(cglconvenience/cglconvenience.pri) include(eglconvenience/eglconvenience.pri) include(eventdispatchers/eventdispatchers.pri) diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h index 4a2cb42f87..8a2a478a72 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h @@ -83,8 +83,8 @@ #include #include #include +#include #include -#include #include diff --git a/src/plugins/platforms/ios/qioseventdispatcher.h b/src/plugins/platforms/ios/qioseventdispatcher.h index e8ea1cc28b..98977eb670 100644 --- a/src/plugins/platforms/ios/qioseventdispatcher.h +++ b/src/plugins/platforms/ios/qioseventdispatcher.h @@ -34,7 +34,7 @@ #ifndef QIOSEVENTDISPATCHER_H #define QIOSEVENTDISPATCHER_H -#include +#include QT_BEGIN_NAMESPACE -- cgit v1.2.3 From 9d1fab424e38d0ed40677926c0a434272ad41320 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 8 Jul 2015 14:35:03 -0700 Subject: Make the C++11 atomic support the default, if available Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1 Reviewed-by: Lars Knoll --- src/corelib/thread/qbasicatomic.h | 12 ++++---- .../thread/qatomicinteger/cxx11/char/char.pro | 1 - .../qatomicinteger/cxx11/char16_t/char16_t.pro | 1 - .../qatomicinteger/cxx11/char32_t/char32_t.pro | 1 - .../thread/qatomicinteger/cxx11/int/int.pro | 1 - .../thread/qatomicinteger/cxx11/long/long.pro | 1 - .../qatomicinteger/cxx11/qlonglong/qlonglong.pro | 1 - .../qatomicinteger/cxx11/qptrdiff/qptrdiff.pro | 1 - .../qatomicinteger/cxx11/quintptr/quintptr.pro | 1 - .../qatomicinteger/cxx11/qulonglong/qulonglong.pro | 1 - .../thread/qatomicinteger/cxx11/schar/schar.pro | 1 - .../thread/qatomicinteger/cxx11/short/short.pro | 1 - .../thread/qatomicinteger/cxx11/uchar/uchar.pro | 1 - .../thread/qatomicinteger/cxx11/uint/uint.pro | 1 - .../thread/qatomicinteger/cxx11/ulong/ulong.pro | 1 - .../thread/qatomicinteger/cxx11/ushort/ushort.pro | 1 - .../qatomicinteger/cxx11/wchar_t/wchar_t.pro | 1 - .../thread/qatomicinteger/no-cxx11/char/char.pro | 1 + .../qatomicinteger/no-cxx11/char16_t/char16_t.pro | 1 + .../qatomicinteger/no-cxx11/char32_t/char32_t.pro | 1 + .../thread/qatomicinteger/no-cxx11/int/int.pro | 1 + .../thread/qatomicinteger/no-cxx11/long/long.pro | 1 + .../no-cxx11/qlonglong/qlonglong.pro | 1 + .../qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro | 1 + .../qatomicinteger/no-cxx11/quintptr/quintptr.pro | 1 + .../no-cxx11/qulonglong/qulonglong.pro | 1 + .../thread/qatomicinteger/no-cxx11/schar/schar.pro | 1 + .../thread/qatomicinteger/no-cxx11/short/short.pro | 1 + .../thread/qatomicinteger/no-cxx11/uchar/uchar.pro | 1 + .../thread/qatomicinteger/no-cxx11/uint/uint.pro | 1 + .../thread/qatomicinteger/no-cxx11/ulong/ulong.pro | 1 + .../qatomicinteger/no-cxx11/ushort/ushort.pro | 1 + .../qatomicinteger/no-cxx11/wchar_t/wchar_t.pro | 1 + .../thread/qatomicinteger/qatomicinteger.pri | 6 ++-- .../thread/qatomicinteger/qatomicinteger.pro | 32 +++++++++++----------- 35 files changed, 41 insertions(+), 41 deletions(-) delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/char/char.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/char16_t/char16_t.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/char32_t/char32_t.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/int/int.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/long/long.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/qlonglong/qlonglong.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/qptrdiff/qptrdiff.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/quintptr/quintptr.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/qulonglong/qulonglong.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/schar/schar.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/short/short.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/uchar/uchar.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/uint/uint.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/ulong/ulong.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/ushort/ushort.pro delete mode 100644 tests/auto/corelib/thread/qatomicinteger/cxx11/wchar_t/wchar_t.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro create mode 100644 tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index ecf39d699f..a747134df3 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -39,11 +39,13 @@ #if defined(QT_BOOTSTRAPPED) # include -// The following two are used for testing only. -// Note that we don't check the compiler support -- you had better -// know what you're doing if you set them -#elif defined(QT_ATOMIC_FORCE_CXX11) +// If C++11 atomics are supported, use them! +#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) && !defined(QT_ATOMIC_FORCE_NO_CXX11) # include + +// The following is used for testing only. +// Note that we don't check the compiler support -- you had better +// know what you're doing if you set it #elif defined(QT_ATOMIC_FORCE_GCC) # include @@ -66,8 +68,6 @@ # include // Fallback compiler dependent implementation -#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) -# include #elif defined(Q_CC_GNU) # include diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/char/char.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/char/char.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/char/char.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/char16_t/char16_t.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/char16_t/char16_t.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/char16_t/char16_t.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/char32_t/char32_t.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/char32_t/char32_t.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/char32_t/char32_t.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/int/int.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/int/int.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/int/int.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/long/long.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/long/long.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/long/long.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/qlonglong/qlonglong.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/qlonglong/qlonglong.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/qlonglong/qlonglong.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/qptrdiff/qptrdiff.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/qptrdiff/qptrdiff.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/qptrdiff/qptrdiff.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/quintptr/quintptr.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/quintptr/quintptr.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/quintptr/quintptr.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/qulonglong/qulonglong.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/qulonglong/qulonglong.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/qulonglong/qulonglong.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/schar/schar.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/schar/schar.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/schar/schar.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/short/short.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/short/short.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/short/short.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/uchar/uchar.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/uchar/uchar.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/uchar/uchar.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/uint/uint.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/uint/uint.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/uint/uint.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/ulong/ulong.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/ulong/ulong.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/ulong/ulong.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/ushort/ushort.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/ushort/ushort.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/ushort/ushort.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/cxx11/wchar_t/wchar_t.pro b/tests/auto/corelib/thread/qatomicinteger/cxx11/wchar_t/wchar_t.pro deleted file mode 100644 index 64401f0229..0000000000 --- a/tests/auto/corelib/thread/qatomicinteger/cxx11/wchar_t/wchar_t.pro +++ /dev/null @@ -1 +0,0 @@ -include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro new file mode 100644 index 0000000000..64401f0229 --- /dev/null +++ b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro @@ -0,0 +1 @@ +include(../../qatomicinteger.pri) diff --git a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri index d9ebe64d5b..e80e71f238 100644 --- a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri +++ b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri @@ -3,9 +3,9 @@ TYPE = $$basename(_PRO_FILE_PWD_) dn = $$dirname(_PRO_FILE_PWD_) FORCE = $$basename(dn) -equals(FORCE, cxx11) { - suffix = Cxx11_$$TYPE - DEFINES += QT_ATOMIC_FORCE_CXX11 +equals(FORCE, no-cxx11) { + suffix = NoCxx11_$$TYPE + DEFINES += QT_ATOMIC_FORCE_NO_CXX11 } else: equals(FORCE, gcc) { suffix = Gcc_$$TYPE DEFINES += QT_ATOMIC_FORCE_GCC diff --git a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro index 58e5b157bd..9d929e649e 100644 --- a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro +++ b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro @@ -19,22 +19,22 @@ SUBDIRS=\ contains(QT_CONFIG, c++11)|msvc: SUBDIRS +=\ - cxx11/char \ - cxx11/char16_t \ - cxx11/char32_t \ - cxx11/int \ - cxx11/long \ - cxx11/qlonglong \ - cxx11/qptrdiff \ - cxx11/quintptr \ - cxx11/qulonglong \ - cxx11/schar \ - cxx11/short \ - cxx11/uchar \ - cxx11/uint \ - cxx11/ulong \ - cxx11/ushort \ - cxx11/wchar_t \ + no-cxx11/char \ + no-cxx11/char16_t \ + no-cxx11/char32_t \ + no-cxx11/int \ + no-cxx11/long \ + no-cxx11/qlonglong \ + no-cxx11/qptrdiff \ + no-cxx11/quintptr \ + no-cxx11/qulonglong \ + no-cxx11/schar \ + no-cxx11/short \ + no-cxx11/uchar \ + no-cxx11/uint \ + no-cxx11/ulong \ + no-cxx11/ushort \ + no-cxx11/wchar_t \ # The GCC-style atomics only support 32-bit and pointer-sized but add -- cgit v1.2.3 From 068a545339a3ec14187e6b9b5ea05c6ffbda05a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 2 Oct 2015 23:48:17 +0200 Subject: Add support for "@3x" image loading. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement as generic "@Nx" support in an exported qt_findAtNxFile function. 3x devices now get one extra file existence test in cases where @3x versions are not present. 1x devices are still on the fast path where there are no extra file system accesses. Add an @3x image to the highdpi manual test. Change-Id: I4ce3fc245ada01ea410abe1443ceb1e3abf7c17f Reviewed-by: Timur Pocheptsov Reviewed-by: Tor Arne Vestbø --- src/gui/image/qicon.cpp | 51 +++++++++++++++++++++++++++-------- src/gui/image/qicon.h | 2 ++ src/gui/text/qtextimagehandler.cpp | 16 +++-------- tests/manual/highdpi/highdpi.qrc | 1 + tests/manual/highdpi/qticon16@3x.png | Bin 0 -> 5307 bytes 5 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 tests/manual/highdpi/qticon16@3x.png diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 7a59adffb8..af3af516db 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -45,6 +45,7 @@ #include "qcache.h" #include "qdebug.h" #include "qpalette.h" +#include "qmath.h" #include "private/qhexstring_p.h" #include "private/qguiapplication_p.h" @@ -1026,19 +1027,13 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State } else { detach(); } + d->engine->addFile(fileName, size, mode, state); - // Check if a "@2x" file exists and add it. - static bool disable2xImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING"); - if (!disable2xImageLoading && qApp->devicePixelRatio() > 1.0) { - QString at2xfileName = fileName; - int dotIndex = fileName.lastIndexOf(QLatin1Char('.')); - if (dotIndex == -1) /* no dot */ - dotIndex = fileName.size(); /* append */ - at2xfileName.insert(dotIndex, QStringLiteral("@2x")); - if (QFile::exists(at2xfileName)) - d->engine->addFile(at2xfileName, size, mode, state); - } + // Check if a "@Nx" file exists and add it. + QString atNxFileName = qt_findAtNxFile(fileName, qApp->devicePixelRatio()); + if (atNxFileName != fileName) + d->engine->addFile(atNxFileName, size, mode, state); } /*! @@ -1375,5 +1370,39 @@ QDebug operator<<(QDebug dbg, const QIcon &i) \internal */ +/*! + \internal + \since 5.6 + Attempts to find a suitable @Nx file for the given \a targetDevicePixelRatio + Returns the the \a baseFileName if no such file was found. + + Given base foo.png and a target dpr of 2.5, this function will look for + foo@3x.png, then foo@2x, then fall back to foo.png if not found. +*/ +QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRatio) +{ + if (targetDevicePixelRatio <= 1.0) + return baseFileName; + + static bool disableNxImageLoading = !qEnvironmentVariableIsEmpty("QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING"); + if (disableNxImageLoading) + return baseFileName; + + QString atNx = QLatin1String("@%1x"); + int dotIndex = baseFileName.lastIndexOf(QLatin1Char('.')); + if (dotIndex == -1) /* no dot */ + dotIndex = baseFileName.size(); /* append */ + + // Check for @Nx, ..., @3x, @2x file versions, + for (int n = qCeil(targetDevicePixelRatio); n > 1; --n) { + QString atNxfileName = baseFileName; + atNxfileName.insert(dotIndex, atNx.arg(n)); + if (QFile::exists(atNxfileName)) + return atNxfileName; + } + + return baseFileName; +} + QT_END_NAMESPACE #endif //QT_NO_ICON diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h index ccddf69101..8c72f54629 100644 --- a/src/gui/image/qicon.h +++ b/src/gui/image/qicon.h @@ -139,6 +139,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QIcon &); Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QIcon &); #endif +Q_GUI_EXPORT QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRatio); + QT_END_NAMESPACE #endif // QICON_H diff --git a/src/gui/text/qtextimagehandler.cpp b/src/gui/text/qtextimagehandler.cpp index 1ba2cb31ca..747ed90281 100644 --- a/src/gui/text/qtextimagehandler.cpp +++ b/src/gui/text/qtextimagehandler.cpp @@ -44,6 +44,7 @@ QT_BEGIN_NAMESPACE +extern QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRatio); static QString resolveFileName(QString fileName, QUrl *url, qreal targetDevicePixelRatio) { // We might use the fileName for loading if url loading fails @@ -62,19 +63,8 @@ static QString resolveFileName(QString fileName, QUrl *url, qreal targetDevicePi if (targetDevicePixelRatio <= 1.0) return fileName; - // try to find a 2x version - - const int dotIndex = fileName.lastIndexOf(QLatin1Char('.')); - if (dotIndex != -1) { - QString at2xfileName = fileName; - at2xfileName.insert(dotIndex, QStringLiteral("@2x")); - if (QFile::exists(at2xfileName)) { - fileName = at2xfileName; - *url = QUrl(fileName); - } - } - - return fileName; + // try to find a Nx version + return qt_findAtNxFile(fileName, targetDevicePixelRatio); } diff --git a/tests/manual/highdpi/highdpi.qrc b/tests/manual/highdpi/highdpi.qrc index 10efac44fa..0e33ed33d7 100644 --- a/tests/manual/highdpi/highdpi.qrc +++ b/tests/manual/highdpi/highdpi.qrc @@ -2,6 +2,7 @@ qticon16.png qticon16@2x.png + qticon16@3x.png qticon32.png qticon32@2x.png qticon64.png diff --git a/tests/manual/highdpi/qticon16@3x.png b/tests/manual/highdpi/qticon16@3x.png new file mode 100644 index 0000000000..de92658241 Binary files /dev/null and b/tests/manual/highdpi/qticon16@3x.png differ -- cgit v1.2.3 From 25e1f4549a12543076322c89b001b3a853d27f01 Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Sat, 17 Oct 2015 15:51:43 +0300 Subject: QFileSystemModel: remove unused functor Change-Id: I5809ebdfcd973336cf42735a1275b57f12e1823c Reviewed-by: Marc Mutz --- src/widgets/dialogs/qfilesystemmodel.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 556e927cbf..7e76a6b9d7 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1768,26 +1768,6 @@ void QFileSystemModelPrivate::removeNode(QFileSystemModelPrivate::QFileSystemNod q->endRemoveRows(); } -/* - \internal - Helper functor used by addVisibleFiles() -*/ -class QFileSystemModelVisibleFinder -{ -public: - inline QFileSystemModelVisibleFinder(QFileSystemModelPrivate::QFileSystemNode *node, QFileSystemModelSorter *sorter) : parentNode(node), sorter(sorter) {} - - bool operator()(const QString &, QString r) const - { - return sorter->compareNodes(parentNode->children.value(name), parentNode->children.value(r)); - } - - QString name; -private: - QFileSystemModelPrivate::QFileSystemNode *parentNode; - QFileSystemModelSorter *sorter; -}; - /*! \internal -- cgit v1.2.3 From b58fc66ed76ddddb01427e6172105f0eaa9561ff Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 17 Sep 2015 22:04:44 -0700 Subject: configure: Open qconfig.h, qconfig.pri and qmodule.pri only once Redirecting on every command is wasteful. Change-Id: I42e7ef1a481840699a8dffff1404fa0602805d1b Reviewed-by: Oswald Buddenhagen --- configure | 180 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 100 insertions(+), 80 deletions(-) diff --git a/configure b/configure index a3e951df9f..95b44e7900 100755 --- a/configure +++ b/configure @@ -6682,12 +6682,18 @@ esac echo "Done running configuration tests." +# Save stdout in fd 3 +exec 3>&1 + #------------------------------------------------------------------------------- # part of configuration information goes into qconfig.h #------------------------------------------------------------------------------- +# Open qconfig.h.new +exec > "$outpath/src/corelib/global/qconfig.h.new" + # start with Qt's version number -cat > "$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" + echo "/* Everything */" ;; *) - tmpconfig="$outpath/src/corelib/global/qconfig.h.new" - echo "#ifndef QT_BOOTSTRAPPED" >>"$tmpconfig" - cat "$CFG_QCONFIG_PATH" >>"$tmpconfig" - echo "#endif" >>"$tmpconfig" + echo "#ifndef QT_BOOTSTRAPPED" + cat "$CFG_QCONFIG_PATH" + echo "#endif" ;; esac -echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new" -[ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new" +echo '/* Compile time features */' +[ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" if [ "$CFG_SHARED" = "no" ]; then - cat >>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_LARGEFILE_SUPPORT 64" fi if [ "$CFG_QREAL" != double ]; then - echo "#define QT_COORD_TYPE $CFG_QREAL" >>"$outpath/src/corelib/global/qconfig.h.new" - echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING" >>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_COORD_TYPE $CFG_QREAL" + echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING" fi if [ "$CFG_FRAMEWORK" = "yes" ]; then - echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_MAC_FRAMEWORK_BUILD" fi if [ "$XPLATFORM_MAC" = "yes" ]; then - cat >>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" + "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" >&3 + echo "#define QT_POINTER_SIZE $?" fi if [ "$CFG_ATOMIC64" = "no" ]; then - echo "#define QT_NO_STD_ATOMIC64" >> "$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_NO_STD_ATOMIC64" fi #REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then - echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_REDUCE_RELOCATIONS" fi # Add compiler sub-architecture support -echo "" >>"$outpath/src/corelib/global/qconfig.h.new" -echo "// Compiler sub-arch support" >>"$outpath/src/corelib/global/qconfig.h.new" +echo "" +echo "// Compiler sub-arch support" for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \ MIPS_DSP MIPS_DSPR2; do eval "VAL=\$CFG_$SUBARCH" case "$VAL" in yes) echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \ - >>"$outpath/src/corelib/global/qconfig.h.new" + ;; esac done -echo "" >>"$outpath/src/corelib/global/qconfig.h.new" +echo "" if [ "$CFG_DEV" = "yes" ]; then - echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_BUILD_INTERNAL" fi # Add QPA to config.h @@ -6854,7 +6859,7 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" QCONFIG_FLAGS=`echo $QCONFIG_FLAGS` if [ -n "$QCONFIG_FLAGS" ]; then -cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF +cat << EOF #ifndef QT_BOOTSTRAPPED EOF @@ -6873,14 +6878,14 @@ EOF fi if [ -z $cfgdNeg ]; then -cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF +cat << EOF #ifndef $cfgd # define $cfg #endif EOF else -cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF +cat << EOF #if defined($cfgd) && defined($cfgdNeg) # undef $cfgd #elif !defined($cfgd) && !defined($cfgdNeg) @@ -6890,27 +6895,30 @@ cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF EOF fi done -cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF +cat << EOF #endif // QT_BOOTSTRAPPED EOF fi if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then -cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF +cat << EOF #define QT_VISIBILITY_AVAILABLE EOF fi if [ -n "$QT_LIBINFIX" ]; then -cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF +cat << EOF #define QT_LIBINFIX "$QT_LIBINFIX" EOF fi -echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$outpath/src/corelib/global/qconfig.h.new" +echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" + +# Close qconfig.h.new (by restoring the original stdout) +exec >&3 # avoid unecessary rebuilds by copying only if qconfig.h has changed if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then @@ -6922,9 +6930,12 @@ fi #------------------------------------------------------------------------------- # save configuration into qconfig.pri #------------------------------------------------------------------------------- + +# open qconfig.pri QTCONFIG="$outpath/mkspecs/qconfig.pri" +exec > "$QTCONFIG.tmp" + QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend" -[ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp" if [ "$CFG_DEBUG" = "yes" ]; then QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug" if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then @@ -6961,7 +6972,7 @@ else fi fi -cat >>"$QTCONFIG.tmp" <> "$QTCONFIG.tmp" - echo "QT_RELEASE_DATE = $ReleaseDate" >> "$QTCONFIG.tmp" + echo "QT_LICHECK = $Licheck" + echo "QT_RELEASE_DATE = $ReleaseDate" fi -echo >> "$QTCONFIG.tmp" +echo if [ "$CFG_SHARED" = "no" ]; then - echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM" >> "$QTCONFIG.tmp" - echo >> "$QTCONFIG.tmp" + echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM" + echo fi if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then - echo "# pkgconfig" >> "$QTCONFIG.tmp" - echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp" - echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp" - echo >> "$QTCONFIG.tmp" + echo "# pkgconfig" + echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" + echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" + echo fi if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then - echo "# sysroot" >>"$QTCONFIG.tmp" - echo "!host_build {" >>"$QTCONFIG.tmp" - echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp" - echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp" - echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" >>"$QTCONFIG.tmp" - echo "}" >> "$QTCONFIG.tmp" - echo >> "$QTCONFIG.tmp" + echo "# sysroot" + echo "!host_build {" + echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" + echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" + echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" + echo "}" + echo fi if [ -n "$RPATH_FLAGS" ]; then - echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp" + echo "QMAKE_RPATHDIR += $RPATH_FLAGS" fi -echo "QT_COMPILER_STDCXX = $CFG_STDCXX_DEFAULT" >> "$QTCONFIG.tmp" +echo "QT_COMPILER_STDCXX = $CFG_STDCXX_DEFAULT" if [ -n "$QT_GCC_MAJOR_VERSION" ]; then - echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp" - echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp" - echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp" + echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" + echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" + echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" fi if [ -n "$QT_ICC_MAJOR_VERSION" ]; then - echo "QT_ICC_MAJOR_VERSION = $QT_ICC_MAJOR_VERSION" >> "$QTCONFIG.tmp" - echo "QT_ICC_MINOR_VERSION = $QT_ICC_MINOR_VERSION" >> "$QTCONFIG.tmp" - echo "QT_ICC_PATCH_VERSION = $QT_ICC_PATCH_VERSION" >> "$QTCONFIG.tmp" + echo "QT_ICC_MAJOR_VERSION = $QT_ICC_MAJOR_VERSION" + echo "QT_ICC_MINOR_VERSION = $QT_ICC_MINOR_VERSION" + echo "QT_ICC_PATCH_VERSION = $QT_ICC_PATCH_VERSION" fi if [ -n "$QT_CLANG_MAJOR_VERSION" ]; then - echo "QT_CLANG_MAJOR_VERSION = $QT_CLANG_MAJOR_VERSION" >> "$QTCONFIG.tmp" - echo "QT_CLANG_MINOR_VERSION = $QT_CLANG_MINOR_VERSION" >> "$QTCONFIG.tmp" + echo "QT_CLANG_MAJOR_VERSION = $QT_CLANG_MAJOR_VERSION" + echo "QT_CLANG_MINOR_VERSION = $QT_CLANG_MINOR_VERSION" fi if [ -n "$QT_APPLE_CLANG_MAJOR_VERSION" ]; then - echo "QT_APPLE_CLANG_MAJOR_VERSION = $QT_APPLE_CLANG_MAJOR_VERSION" >> "$QTCONFIG.tmp" - echo "QT_APPLE_CLANG_MINOR_VERSION = $QT_APPLE_CLANG_MINOR_VERSION" >> "$QTCONFIG.tmp" + echo "QT_APPLE_CLANG_MAJOR_VERSION = $QT_APPLE_CLANG_MAJOR_VERSION" + echo "QT_APPLE_CLANG_MINOR_VERSION = $QT_APPLE_CLANG_MINOR_VERSION" fi if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then - echo "#Qt opengl include path" >> "$QTCONFIG.tmp" - echo "QMAKE_INCDIR_OPENGL_ES2 = `shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`" >> "$QTCONFIG.tmp" + echo "#Qt opengl include path" + echo "QMAKE_INCDIR_OPENGL_ES2 = `shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`" fi +# Close qconfig.pri.tmp (by restoring the original stdout) +exec >&3 + # replace qconfig.pri if it differs from the newly created temp file if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then rm -f "$QTCONFIG.tmp" @@ -7052,12 +7066,15 @@ fi #------------------------------------------------------------------------------- # save configuration into qmodule.pri #------------------------------------------------------------------------------- + +# open qmodule.pri QTMODULE="$outpath/mkspecs/qmodule.pri" +exec > "$QTMODULE.tmp" -echo "CONFIG += $QMAKE_CONFIG" >> "$QTMODULE.tmp" -echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp" +echo "CONFIG += $QMAKE_CONFIG" +echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" if [ -n "$CFG_SKIP_MODULES" ]; then - echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" >> "$QTMODULE.tmp" + echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES" fi DISABLED_FEATURES= for cfg in $QCONFIG_FLAGS; do @@ -7067,9 +7084,9 @@ for cfg in $QCONFIG_FLAGS; do fi done if [ -n "$DISABLED_FEATURES" ]; then - echo "QT_NO_DEFINES = $DISABLED_FEATURES" >> "$QTMODULE.tmp" + echo "QT_NO_DEFINES = $DISABLED_FEATURES" fi -echo "QT_QCONFIG_PATH = ${CFG_QCONFIG_PATH#$relpath/src/corelib/global/}" >> "$QTMODULE.tmp" +echo "QT_QCONFIG_PATH = ${CFG_QCONFIG_PATH#$relpath/src/corelib/global/}" cat >>"$QTMODULE.tmp" <> "$QTMODULE.tmp" +echo "QT_COORD_TYPE = $CFG_QREAL" if [ -n "$QT_CFLAGS_PSQL" ]; then - echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$QTMODULE.tmp" + echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" fi if [ -n "$QT_LFLAGS_PSQL" ]; then - echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$QTMODULE.tmp" + echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" fi if [ -n "$QT_CFLAGS_MYSQL" ]; then - echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$QTMODULE.tmp" + echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" fi if [ -n "$QT_LFLAGS_MYSQL" ]; then - echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$QTMODULE.tmp" + echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" fi if [ -n "$QT_CFLAGS_SQLITE" ]; then - echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$QTMODULE.tmp" + echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" fi if [ -n "$QT_LFLAGS_SQLITE" ]; then - echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$QTMODULE.tmp" + echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" fi if [ -n "$QT_LFLAGS_ODBC" ]; then - echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$QTMODULE.tmp" + echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" fi if [ -n "$QT_LFLAGS_TDS" ]; then - echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$QTMODULE.tmp" + echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" fi #dump in the OPENSSL_LIBS info if [ '!' -z "$OPENSSL_LIBS" ]; then - echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$QTMODULE.tmp" + echo "OPENSSL_LIBS = $OPENSSL_LIBS" elif [ "$CFG_OPENSSL" = "linked" ]; then - echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp" + echo "OPENSSL_LIBS = -lssl -lcrypto" fi # cmdline args -cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp" +cat "$QMAKE_VARS_FILE" # QMAKE_VARS_FILE will be still needed for a status message. +# Close qmodule.pri.tmp (by restoring the original stdout) +exec >&3 + # replace qmodule.pri if it differs from the newly created temp file if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then rm -f "$QTMODULE.tmp" @@ -7126,7 +7146,7 @@ fi #------------------------------------------------------------------------------- # give feedback on configuration #------------------------------------------------------------------------------- -exec 3>&1 1>$outpath/config.summary # redirect output temporarily to config.summary +exec 1>$outpath/config.summary # redirect output temporarily to config.summary report_support() { -- cgit v1.2.3 From 27361eadf178e6544277118973a00151daebfc8a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 9 Jul 2015 16:58:05 -0700 Subject: Add a deprecation warning to configure about -no-c++11 We'll remove it in Qt 5.7, so people ought to be notified now. Change-Id: Ib056b47dde3341ef9a52ffff13ef6caa91757a9f Reviewed-by: Lars Knoll --- configure | 14 ++++++++++++++ tools/configure/configureapp.cpp | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/configure b/configure index 95b44e7900..85de53ca63 100755 --- a/configure +++ b/configure @@ -7497,6 +7497,20 @@ cat < Date: Sun, 18 Oct 2015 00:11:49 +0200 Subject: Fix cocoa plugin build with OS X 10.8 SDK With the 10.8 SDK, NSArray may not respond to firstObject which ends the build with an error. This implementation doesn't use it and also handles the case where no screen is available when calling qt_mac_mainScreenHeight Change-Id: Idce278423c37cc24d8fc31062a386e78d6487492 Reviewed-by: Jake Petroules --- src/plugins/platforms/cocoa/qcocoahelpers.mm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index 8ad80333f8..f51c21ee9b 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -634,10 +634,14 @@ QString qt_mac_applicationName() int qt_mac_mainScreenHeight() { QMacAutoReleasePool pool; - // The first screen in the screens array is documented - // to have the (0,0) origin. - NSRect screenFrame = [[[NSScreen screens] firstObject] frame]; - return screenFrame.size.height; + NSArray *screens = [NSScreen screens]; + if ([screens count] > 0) { + // The first screen in the screens array is documented + // to have the (0,0) origin. + NSRect screenFrame = [[screens objectAtIndex: 0] frame]; + return screenFrame.size.height; + } + return 0; } int qt_mac_flipYCoordinate(int y) -- cgit v1.2.3 From 3695285fde904935fc2e88010dac171144e8677a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 18 Mar 2015 15:12:11 +0100 Subject: The C locale should omit group separators by default Numbers formatted in the C locale should not use group separators by default. [ChangeLog][QtCore][QLocale] The C locale does not use group separators when formatting numbers any more. Task-number: QTBUG-4044 Task-number: QTBUG-3068 Change-Id: Ia647a72efc11fecd66d22f9253562b1d4ef58168 Reviewed-by: Thiago Macieira --- src/corelib/tools/qlocale.cpp | 5 +++-- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 21 +++++++++++---------- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 3 ++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 57ef53eea4..b1f53dc7a2 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -526,7 +526,7 @@ static uint default_number_options = 0; static const QLocaleData *const c_data = locale_data; static QLocalePrivate *c_private() { - static QLocalePrivate c_locale = { c_data, Q_BASIC_ATOMIC_INITIALIZER(1), 0 }; + static QLocalePrivate c_locale = { c_data, Q_BASIC_ATOMIC_INITIALIZER(1), QLocale::OmitGroupSeparator }; return &c_locale; } @@ -698,7 +698,8 @@ static QLocalePrivate *localePrivateByName(const QString &name) { if (name == QLatin1String("C")) return c_private(); - return QLocalePrivate::create(findLocaleData(name)); + const QLocaleData *data = findLocaleData(name); + return QLocalePrivate::create(data, data->m_language_id == QLocale::C ? QLocale::OmitGroupSeparator : 0); } static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Script script, diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 11b6922278..0466ced10a 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -902,6 +902,7 @@ void tst_QLocale::long_long_conversion() void tst_QLocale::long_long_conversion_extra() { QLocale l(QLocale::C); + l.setNumberOptions(0); QCOMPARE(l.toString((qlonglong)1), QString("1")); QCOMPARE(l.toString((qlonglong)12), QString("12")); QCOMPARE(l.toString((qlonglong)123), QString("123")); @@ -1613,20 +1614,20 @@ void tst_QLocale::numberOptions() bool ok; QLocale locale(QLocale::C); - QCOMPARE(locale.numberOptions(), 0); - QCOMPARE(locale.toInt(QString("12,345"), &ok), 12345); + QCOMPARE(locale.numberOptions(), QLocale::OmitGroupSeparator); + QCOMPARE(locale.toInt(QString("12345"), &ok), 12345); QVERIFY(ok); QCOMPARE(locale.toInt(QString("12345"), &ok), 12345); QVERIFY(ok); - QCOMPARE(locale.toString(12345), QString("12,345")); + QCOMPARE(locale.toString(12345), QString("12345")); - locale.setNumberOptions(QLocale::OmitGroupSeparator); - QCOMPARE(locale.numberOptions(), QLocale::OmitGroupSeparator); + locale.setNumberOptions(0); + QCOMPARE(locale.numberOptions(), 0); QCOMPARE(locale.toInt(QString("12,345"), &ok), 12345); QVERIFY(ok); QCOMPARE(locale.toInt(QString("12345"), &ok), 12345); QVERIFY(ok); - QCOMPARE(locale.toString(12345), QString("12345")); + QCOMPARE(locale.toString(12345), QString("12,345")); locale.setNumberOptions(QLocale::RejectGroupSeparator); QCOMPARE(locale.numberOptions(), QLocale::RejectGroupSeparator); @@ -2033,10 +2034,10 @@ void tst_QLocale::standaloneMonthName() void tst_QLocale::currency() { const QLocale c(QLocale::C); - QCOMPARE(c.toCurrencyString(qulonglong(1234)), QString("1,234")); - QCOMPARE(c.toCurrencyString(qlonglong(-1234)), QString("-1,234")); - QCOMPARE(c.toCurrencyString(double(1234.56)), QString("1,234.56")); - QCOMPARE(c.toCurrencyString(double(-1234.56)), QString("-1,234.56")); + QCOMPARE(c.toCurrencyString(qulonglong(1234)), QString("1234")); + QCOMPARE(c.toCurrencyString(qlonglong(-1234)), QString("-1234")); + QCOMPARE(c.toCurrencyString(double(1234.56)), QString("1234.56")); + QCOMPARE(c.toCurrencyString(double(-1234.56)), QString("-1234.56")); const QLocale en_US("en_US"); QCOMPARE(en_US.toCurrencyString(qulonglong(1234)), QString("$1,234")); diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 10747427c7..d18aa9f5f3 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -6255,14 +6255,15 @@ void tst_QString::arg_locale() QLocale l(QLocale::English, QLocale::UnitedKingdom); QString str("*%L1*%L2*"); - QCOMPARE(str.arg(123456).arg(1234.56), QString::fromLatin1("*123,456*1,234.56*")); QLocale::setDefault(l); + QCOMPARE(str.arg(123456).arg(1234.56), QString::fromLatin1("*123,456*1,234.56*")); l.setNumberOptions(QLocale::OmitGroupSeparator); QLocale::setDefault(l); QCOMPARE(str.arg(123456).arg(1234.56), QString::fromLatin1("*123456*1234.56*")); QLocale::setDefault(QLocale::C); + QCOMPARE(str.arg(123456).arg(1234.56), QString::fromLatin1("*123456*1234.56*")); } -- cgit v1.2.3 From 2eb0f8488cbfc6f7d9aedf7fe29a62ff579456ef Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 18 Mar 2015 15:18:01 +0100 Subject: Make sure registered schemes are lower case QUrl::scheme() already returns the scheme in lowercase, so this should guarantee that the matching works correctly. Task-number: QTBUG-5552 Change-Id: Ie68e01943c8cb105e11e54b348a090d9ffd5e65b Reviewed-by: Thiago Macieira --- src/gui/util/qdesktopservices.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 4c92e5d000..354dfeb78c 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -231,13 +231,13 @@ void QDesktopServices::setUrlHandler(const QString &scheme, QObject *receiver, c QOpenUrlHandlerRegistry *registry = handlerRegistry(); QMutexLocker locker(®istry->mutex); if (!receiver) { - registry->handlers.remove(scheme); + registry->handlers.remove(scheme.toLower()); return; } QOpenUrlHandlerRegistry::Handler h; h.receiver = receiver; h.name = method; - registry->handlers.insert(scheme, h); + registry->handlers.insert(scheme.toLower(), h); QObject::connect(receiver, SIGNAL(destroyed(QObject*)), registry, SLOT(handlerDestroyed(QObject*))); } -- cgit v1.2.3 From 5c995fbb8faec7096ac0e99366e8507d94b0ae53 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 14 Oct 2015 23:12:51 +0200 Subject: uic: updates from running generate_ui (II) (as of qttools:1ed9418c0f38190cd839164229eeb7504438f740) Change-Id: I4a30878450218a56fa6af23b6784b314ab499338 Reviewed-by: Friedemann Kleint --- src/tools/uic/ui4.cpp | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp index 6779dbf9e7..a09e63ed7c 100644 --- a/src/tools/uic/ui4.cpp +++ b/src/tools/uic/ui4.cpp @@ -144,11 +144,11 @@ void DomUI::read(QXmlStreamReader &reader) continue; } if (name == QLatin1String("stdsetdef")) { - setAttributeStdsetdef(attribute.value().toString().toInt()); + setAttributeStdsetdef(attribute.value().toInt()); continue; } if (name == QLatin1String("stdSetDef")) { - setAttributeStdSetDef(attribute.value().toString().toInt()); + setAttributeStdSetDef(attribute.value().toInt()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -1693,7 +1693,7 @@ void DomImageData::read(QXmlStreamReader &reader) continue; } if (name == QLatin1String("length")) { - setAttributeLength(attribute.value().toString().toInt()); + setAttributeLength(attribute.value().toInt()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -2540,11 +2540,11 @@ void DomLayoutDefault::read(QXmlStreamReader &reader) foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { QStringRef name = attribute.name(); if (name == QLatin1String("spacing")) { - setAttributeSpacing(attribute.value().toString().toInt()); + setAttributeSpacing(attribute.value().toInt()); continue; } if (name == QLatin1String("margin")) { - setAttributeMargin(attribute.value().toString().toInt()); + setAttributeMargin(attribute.value().toInt()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -2966,19 +2966,19 @@ void DomLayoutItem::read(QXmlStreamReader &reader) foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { QStringRef name = attribute.name(); if (name == QLatin1String("row")) { - setAttributeRow(attribute.value().toString().toInt()); + setAttributeRow(attribute.value().toInt()); continue; } if (name == QLatin1String("column")) { - setAttributeColumn(attribute.value().toString().toInt()); + setAttributeColumn(attribute.value().toInt()); continue; } if (name == QLatin1String("rowspan")) { - setAttributeRowSpan(attribute.value().toString().toInt()); + setAttributeRowSpan(attribute.value().toInt()); continue; } if (name == QLatin1String("colspan")) { - setAttributeColSpan(attribute.value().toString().toInt()); + setAttributeColSpan(attribute.value().toInt()); continue; } if (name == QLatin1String("alignment")) { @@ -3303,11 +3303,11 @@ void DomItem::read(QXmlStreamReader &reader) foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { QStringRef name = attribute.name(); if (name == QLatin1String("row")) { - setAttributeRow(attribute.value().toString().toInt()); + setAttributeRow(attribute.value().toInt()); continue; } if (name == QLatin1String("column")) { - setAttributeColumn(attribute.value().toString().toInt()); + setAttributeColumn(attribute.value().toInt()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -3474,7 +3474,7 @@ void DomWidget::read(QXmlStreamReader &reader) continue; } if (name == QLatin1String("native")) { - setAttributeNative(attribute.value().toString() == QLatin1String("true")); + setAttributeNative(attribute.value() == QLatin1String("true")); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -3860,7 +3860,7 @@ void DomColor::read(QXmlStreamReader &reader) foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { QStringRef name = attribute.name(); if (name == QLatin1String("alpha")) { - setAttributeAlpha(attribute.value().toString().toInt()); + setAttributeAlpha(attribute.value().toInt()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -3989,7 +3989,7 @@ void DomGradientStop::read(QXmlStreamReader &reader) foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { QStringRef name = attribute.name(); if (name == QLatin1String("position")) { - setAttributePosition(attribute.value().toString().toDouble()); + setAttributePosition(attribute.value().toDouble()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -4135,43 +4135,43 @@ void DomGradient::read(QXmlStreamReader &reader) foreach (const QXmlStreamAttribute &attribute, reader.attributes()) { QStringRef name = attribute.name(); if (name == QLatin1String("startx")) { - setAttributeStartX(attribute.value().toString().toDouble()); + setAttributeStartX(attribute.value().toDouble()); continue; } if (name == QLatin1String("starty")) { - setAttributeStartY(attribute.value().toString().toDouble()); + setAttributeStartY(attribute.value().toDouble()); continue; } if (name == QLatin1String("endx")) { - setAttributeEndX(attribute.value().toString().toDouble()); + setAttributeEndX(attribute.value().toDouble()); continue; } if (name == QLatin1String("endy")) { - setAttributeEndY(attribute.value().toString().toDouble()); + setAttributeEndY(attribute.value().toDouble()); continue; } if (name == QLatin1String("centralx")) { - setAttributeCentralX(attribute.value().toString().toDouble()); + setAttributeCentralX(attribute.value().toDouble()); continue; } if (name == QLatin1String("centraly")) { - setAttributeCentralY(attribute.value().toString().toDouble()); + setAttributeCentralY(attribute.value().toDouble()); continue; } if (name == QLatin1String("focalx")) { - setAttributeFocalX(attribute.value().toString().toDouble()); + setAttributeFocalX(attribute.value().toDouble()); continue; } if (name == QLatin1String("focaly")) { - setAttributeFocalY(attribute.value().toString().toDouble()); + setAttributeFocalY(attribute.value().toDouble()); continue; } if (name == QLatin1String("radius")) { - setAttributeRadius(attribute.value().toString().toDouble()); + setAttributeRadius(attribute.value().toDouble()); continue; } if (name == QLatin1String("angle")) { - setAttributeAngle(attribute.value().toString().toDouble()); + setAttributeAngle(attribute.value().toDouble()); continue; } if (name == QLatin1String("type")) { @@ -7262,7 +7262,7 @@ void DomProperty::read(QXmlStreamReader &reader) continue; } if (name == QLatin1String("stdset")) { - setAttributeStdset(attribute.value().toString().toInt()); + setAttributeStdset(attribute.value().toInt()); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); -- cgit v1.2.3 From a769ab22ea768981d752399388fc7e2a7d561bbc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 14 Oct 2015 23:21:19 +0200 Subject: uic: updates from running generate_ui (III) (as of qttools:a7ff0d7d9ac2ff17e540521ef59029bf5cb35e14) Saves almost 10K of text size on optimized GCC 4.9 AMD64 Linux builds. Change-Id: Ib059e8b076362dbf81356861bebaec3810af6dcc Reviewed-by: Friedemann Kleint --- src/tools/uic/ui4.cpp | 202 +++++++++++++++++++++++++------------------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp index a09e63ed7c..acde63d301 100644 --- a/src/tools/uic/ui4.cpp +++ b/src/tools/uic/ui4.cpp @@ -151,7 +151,7 @@ void DomUI::read(QXmlStreamReader &reader) setAttributeStdSetDef(attribute.value().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -250,7 +250,7 @@ void DomUI::read(QXmlStreamReader &reader) setElementButtonGroups(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -714,7 +714,7 @@ void DomIncludes::read(QXmlStreamReader &reader) m_include.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -787,14 +787,14 @@ void DomInclude::read(QXmlStreamReader &reader) setAttributeImpldecl(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -860,7 +860,7 @@ void DomResources::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -873,7 +873,7 @@ void DomResources::read(QXmlStreamReader &reader) m_include.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -942,14 +942,14 @@ void DomResource::read(QXmlStreamReader &reader) setAttributeLocation(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1024,7 +1024,7 @@ void DomActionGroup::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -1055,7 +1055,7 @@ void DomActionGroup::read(QXmlStreamReader &reader) m_attribute.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1168,7 +1168,7 @@ void DomAction::read(QXmlStreamReader &reader) setAttributeMenu(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -1187,7 +1187,7 @@ void DomAction::read(QXmlStreamReader &reader) m_attribute.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1269,14 +1269,14 @@ void DomActionRef::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1343,7 +1343,7 @@ void DomButtonGroup::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -1362,7 +1362,7 @@ void DomButtonGroup::read(QXmlStreamReader &reader) m_attribute.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1447,7 +1447,7 @@ void DomButtonGroups::read(QXmlStreamReader &reader) m_buttonGroup.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1519,7 +1519,7 @@ void DomImages::read(QXmlStreamReader &reader) m_image.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1589,7 +1589,7 @@ void DomImage::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -1602,7 +1602,7 @@ void DomImage::read(QXmlStreamReader &reader) setElementData(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1696,14 +1696,14 @@ void DomImageData::read(QXmlStreamReader &reader) setAttributeLength(attribute.value().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1771,7 +1771,7 @@ void DomCustomWidgets::read(QXmlStreamReader &reader) m_customWidget.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1838,14 +1838,14 @@ void DomHeader::read(QXmlStreamReader &reader) setAttributeLocation(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -1992,7 +1992,7 @@ void DomCustomWidget::read(QXmlStreamReader &reader) setElementPropertyspecifications(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2311,7 +2311,7 @@ void DomProperties::read(QXmlStreamReader &reader) m_property.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2377,14 +2377,14 @@ void DomPropertyData::read(QXmlStreamReader &reader) setAttributeType(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2451,7 +2451,7 @@ void DomSizePolicyData::read(QXmlStreamReader &reader) setElementVerData(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2547,14 +2547,14 @@ void DomLayoutDefault::read(QXmlStreamReader &reader) setAttributeMargin(attribute.value().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2622,14 +2622,14 @@ void DomLayoutFunction::read(QXmlStreamReader &reader) setAttributeMargin(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2693,7 +2693,7 @@ void DomTabStops::read(QXmlStreamReader &reader) m_tabStop.append(reader.readElementText()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2807,7 +2807,7 @@ void DomLayout::read(QXmlStreamReader &reader) setAttributeColumnMinimumWidth(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -2832,7 +2832,7 @@ void DomLayout::read(QXmlStreamReader &reader) m_item.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -2985,7 +2985,7 @@ void DomLayoutItem::read(QXmlStreamReader &reader) setAttributeAlignment(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -3010,7 +3010,7 @@ void DomLayoutItem::read(QXmlStreamReader &reader) setElementSpacer(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3154,7 +3154,7 @@ void DomRow::read(QXmlStreamReader &reader) m_property.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3226,7 +3226,7 @@ void DomColumn::read(QXmlStreamReader &reader) m_property.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3310,7 +3310,7 @@ void DomItem::read(QXmlStreamReader &reader) setAttributeColumn(attribute.value().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -3329,7 +3329,7 @@ void DomItem::read(QXmlStreamReader &reader) m_item.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3477,7 +3477,7 @@ void DomWidget::read(QXmlStreamReader &reader) setAttributeNative(attribute.value() == QLatin1String("true")); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -3564,7 +3564,7 @@ void DomWidget::read(QXmlStreamReader &reader) m_zOrder.append(reader.readElementText()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3773,7 +3773,7 @@ void DomSpacer::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -3786,7 +3786,7 @@ void DomSpacer::read(QXmlStreamReader &reader) m_property.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3863,7 +3863,7 @@ void DomColor::read(QXmlStreamReader &reader) setAttributeAlpha(attribute.value().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -3882,7 +3882,7 @@ void DomColor::read(QXmlStreamReader &reader) setElementBlue(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -3992,7 +3992,7 @@ void DomGradientStop::read(QXmlStreamReader &reader) setAttributePosition(attribute.value().toDouble()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -4005,7 +4005,7 @@ void DomGradientStop::read(QXmlStreamReader &reader) setElementColor(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -4186,7 +4186,7 @@ void DomGradient::read(QXmlStreamReader &reader) setAttributeCoordinateMode(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -4199,7 +4199,7 @@ void DomGradient::read(QXmlStreamReader &reader) m_gradientStop.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -4318,7 +4318,7 @@ void DomBrush::read(QXmlStreamReader &reader) setAttributeBrushStyle(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -4343,7 +4343,7 @@ void DomBrush::read(QXmlStreamReader &reader) setElementGradient(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -4473,7 +4473,7 @@ void DomColorRole::read(QXmlStreamReader &reader) setAttributeRole(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -4486,7 +4486,7 @@ void DomColorRole::read(QXmlStreamReader &reader) setElementBrush(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -4587,7 +4587,7 @@ void DomColorGroup::read(QXmlStreamReader &reader) m_color.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -4689,7 +4689,7 @@ void DomPalette::read(QXmlStreamReader &reader) setElementDisabled(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -4875,7 +4875,7 @@ void DomFont::read(QXmlStreamReader &reader) setElementKerning(reader.readElementText() == QLatin1String("true")); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5089,7 +5089,7 @@ void DomPoint::read(QXmlStreamReader &reader) setElementY(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5195,7 +5195,7 @@ void DomRect::read(QXmlStreamReader &reader) setElementHeight(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5317,14 +5317,14 @@ void DomLocale::read(QXmlStreamReader &reader) setAttributeCountry(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5400,7 +5400,7 @@ void DomSizePolicy::read(QXmlStreamReader &reader) setAttributeVSizeType(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -5423,7 +5423,7 @@ void DomSizePolicy::read(QXmlStreamReader &reader) setElementVerStretch(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5553,7 +5553,7 @@ void DomSize::read(QXmlStreamReader &reader) setElementHeight(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5653,7 +5653,7 @@ void DomDate::read(QXmlStreamReader &reader) setElementDay(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5768,7 +5768,7 @@ void DomTime::read(QXmlStreamReader &reader) setElementSecond(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -5901,7 +5901,7 @@ void DomDateTime::read(QXmlStreamReader &reader) setElementDay(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6061,7 +6061,7 @@ void DomStringList::read(QXmlStreamReader &reader) setAttributeExtraComment(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -6072,7 +6072,7 @@ void DomStringList::read(QXmlStreamReader &reader) m_string.append(reader.readElementText()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6154,14 +6154,14 @@ void DomResourcePixmap::read(QXmlStreamReader &reader) setAttributeAlias(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6262,7 +6262,7 @@ void DomResourceIcon::read(QXmlStreamReader &reader) setAttributeResource(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -6317,7 +6317,7 @@ void DomResourceIcon::read(QXmlStreamReader &reader) setElementSelectedOn(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6600,14 +6600,14 @@ void DomString::read(QXmlStreamReader &reader) setAttributeExtraComment(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6680,7 +6680,7 @@ void DomPointF::read(QXmlStreamReader &reader) setElementY(reader.readElementText().toDouble()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6786,7 +6786,7 @@ void DomRectF::read(QXmlStreamReader &reader) setElementHeight(reader.readElementText().toDouble()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6910,7 +6910,7 @@ void DomSizeF::read(QXmlStreamReader &reader) setElementHeight(reader.readElementText().toDouble()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -6998,7 +6998,7 @@ void DomChar::read(QXmlStreamReader &reader) setElementUnicode(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -7075,7 +7075,7 @@ void DomUrl::read(QXmlStreamReader &reader) setElementString(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -7265,7 +7265,7 @@ void DomProperty::read(QXmlStreamReader &reader) setAttributeStdset(attribute.value().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -7446,7 +7446,7 @@ void DomProperty::read(QXmlStreamReader &reader) setElementBrush(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8091,7 +8091,7 @@ void DomConnections::read(QXmlStreamReader &reader) m_connection.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8179,7 +8179,7 @@ void DomConnection::read(QXmlStreamReader &reader) setElementHints(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8327,7 +8327,7 @@ void DomConnectionHints::read(QXmlStreamReader &reader) m_hint.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8397,7 +8397,7 @@ void DomConnectionHint::read(QXmlStreamReader &reader) setAttributeType(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { @@ -8412,7 +8412,7 @@ void DomConnectionHint::read(QXmlStreamReader &reader) setElementY(reader.readElementText().toInt()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8507,14 +8507,14 @@ void DomScript::read(QXmlStreamReader &reader) setAttributeLanguage(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8582,7 +8582,7 @@ void DomWidgetData::read(QXmlStreamReader &reader) m_property.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8654,7 +8654,7 @@ void DomDesignerData::read(QXmlStreamReader &reader) m_property.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8728,7 +8728,7 @@ void DomSlots::read(QXmlStreamReader &reader) m_slot.append(reader.readElementText()); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8820,7 +8820,7 @@ void DomPropertySpecifications::read(QXmlStreamReader &reader) m_stringpropertyspecification.append(v); continue; } - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8896,14 +8896,14 @@ void DomPropertyToolTip::read(QXmlStreamReader &reader) setAttributeName(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : @@ -8974,14 +8974,14 @@ void DomStringPropertySpecification::read(QXmlStreamReader &reader) setAttributeNotr(attribute.value().toString()); continue; } - reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); + reader.raiseError(QLatin1String("Unexpected attribute ") + name); } for (bool finished = false; !finished && !reader.hasError();) { switch (reader.readNext()) { case QXmlStreamReader::StartElement : { const QString tag = reader.name().toString().toLower(); - reader.raiseError(QStringLiteral("Unexpected element ") + tag); + reader.raiseError(QLatin1String("Unexpected element ") + tag); } break; case QXmlStreamReader::EndElement : -- cgit v1.2.3 From 1735024e9dbdba20f7c43248671e5413a058bfc8 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 16 Oct 2015 12:09:23 +0200 Subject: qdoc: Warn if a topic command is not allowed in a \qmlpropertygroup Change-Id: Icff1f3a4e85ce1eb2afe0a4d66f0728dc414c6ec Reviewed-by: Venugopal Shivashankar --- src/tools/qdoc/cppcodeparser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index f20b998cc4..0405cc2c2b 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -833,6 +833,10 @@ void CppCodeParser::processQmlProperties(const Doc& doc, } } } + } else if (qpgn) { + doc.startLocation().warning( + tr("Invalid use of '\\%1'; not allowed in a '\\%2'").arg( + topic, qmlPropertyGroupTopic.topic)); } } } -- cgit v1.2.3 From afcc26619f642baee9a09151dc8dae5ef2cb9e2e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 16 Oct 2015 12:12:09 +0200 Subject: qdoc: Conditionally generate the navigation bar items as table cells The new offline template for Qt 5.6, including simplified CSS rules suitable for rendering with a QTextBrowser, requires the navigation bar to be generated as an HTML table instead of the previously-used unordered list. Make QDoc select between the two based on the contents of HTML.postheader .qdocconf variable, which defines the header of the navigation bar. Modify the old offline CSS to look good also when the nav. bar is a table. Task-number: QTBUG-48322 Change-Id: I00e16c24f436e0be049b85d4bcfc916c33ea6b73 Reviewed-by: Venugopal Shivashankar Reviewed-by: Martin Smith --- doc/global/template/style/offline.css | 19 +++++++++- src/tools/qdoc/htmlgenerator.cpp | 69 +++++++++++++++++++++-------------- src/tools/qdoc/htmlgenerator.h | 8 ++-- 3 files changed, 65 insertions(+), 31 deletions(-) diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index 16f26f43bb..1936b16bda 100644 --- a/doc/global/template/style/offline.css +++ b/doc/global/template/style/offline.css @@ -266,7 +266,7 @@ footer and license float: left } - .navigationbar li a { + .navigationbar li a, .navigationbar td a { display: block; text-decoration: none; background: url(../images/arrow_bc.png); @@ -275,6 +275,23 @@ footer and license padding-right: 17px; } +table.buildversion { + float: right; + margin-top: -18px !important; +} + +.navigationbar table { + border-radius: 0; + border: 0 none; + background-color: #F2F2F2; + margin: 0; +} + +.navigationbar table td { + padding: 0; + border: 0 none; +} + #buildversion { font-style: italic; font-size: small; diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 90f8ab2046..b260e7ac1c 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -1847,71 +1847,87 @@ QString HtmlGenerator::fileExtension() const Output navigation list in the html file. */ void HtmlGenerator::generateNavigationBar(const QString &title, - const Node *node, - CodeMarker *marker) + const Node *node, + CodeMarker *marker, + const QString &buildversion, + bool tableItems) { if (noNavigationBar) return; Text navigationbar; + // Set list item types based on the navigation bar type + Atom::AtomType itemLeft = tableItems ? + Atom::TableItemLeft : Atom::ListItemLeft; + Atom::AtomType itemRight = tableItems ? + Atom::TableItemRight : Atom::ListItemRight; + if (homepage == title) return; if (!homepage.isEmpty()) - navigationbar << Atom(Atom::ListItemLeft) - << Atom(Atom::NavAutoLink, homepage) - << Atom(Atom::ListItemRight); + navigationbar << Atom(itemLeft) + << Atom(Atom::NavAutoLink, homepage) + << Atom(itemRight); if (!landingpage.isEmpty() && landingpage != title) - navigationbar << Atom(Atom::ListItemLeft) + navigationbar << Atom(itemLeft) << Atom(Atom::NavAutoLink, landingpage) - << Atom(Atom::ListItemRight); + << Atom(itemRight); if (node->isClass()) { - const ClassNode *cn = static_cast(node); - QString name = node->physicalModuleName(); - if (!cppclassespage.isEmpty()) - navigationbar << Atom(Atom::ListItemLeft) + navigationbar << Atom(itemLeft) << Atom(Atom::NavLink, cppclassespage) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << Atom(Atom::String, QLatin1String("C++ Classes")) << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom(Atom::ListItemRight); + << Atom(itemRight); - if (!cn->name().isEmpty()) - navigationbar << Atom(Atom::ListItemLeft) - << Atom(Atom::String, cn->name()) - << Atom(Atom::ListItemRight); + if (!node->name().isEmpty()) + navigationbar << Atom(itemLeft) + << Atom(Atom::String, node->name()) + << Atom(itemRight); } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType() || node->isJsBasicType()) { if (!qmltypespage.isEmpty()) - navigationbar << Atom(Atom::ListItemLeft) + navigationbar << Atom(itemLeft) << Atom(Atom::NavLink, qmltypespage) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << Atom(Atom::String, QLatin1String("QML Types")) << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom(Atom::ListItemRight) - << Atom(Atom::ListItemLeft) + << Atom(itemRight) + << Atom(itemLeft) << Atom(Atom::String, title) - << Atom(Atom::ListItemRight); + << Atom(itemRight); } else { if (node->isExampleFile()) { - navigationbar << Atom(Atom::ListItemLeft) + navigationbar << Atom(itemLeft) << Atom(Atom::NavLink, node->parent()->name()) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << Atom(Atom::String, node->parent()->title()) << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom(Atom::ListItemRight); + << Atom(itemRight); } - navigationbar << Atom(Atom::ListItemLeft) + navigationbar << Atom(itemLeft) << Atom(Atom::String, title) - << Atom(Atom::ListItemRight); + << Atom(itemRight); } generateText(navigationbar, node, marker); + + if (buildversion.isEmpty()) + return; + + if (tableItems) { + out() << "\n" + << "\n"; + } else { + out() << "
  • " << buildversion << "
  • \n"; + } } void HtmlGenerator::generateHeader(const QString& title, @@ -1990,9 +2006,8 @@ void HtmlGenerator::generateHeader(const QString& title, #endif out() << QString(postHeader).replace("\\" + COMMAND_VERSION, qdb_->version()); - generateNavigationBar(title,node,marker); - if (!buildversion.isEmpty()) - out() << "
  • " << buildversion << "
  • \n"; + bool usingTable = postHeader.trimmed().endsWith(QLatin1String("")); + generateNavigationBar(title, node, marker, buildversion, usingTable); out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, qdb_->version()); navigationLinks.clear(); diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h index bbb8f12e3e..0cf367b437 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -125,9 +125,11 @@ private: }; const QPair anchorForNode(const Node *node); - void generateNavigationBar(const QString& title, - const Node *node, - CodeMarker *marker); + void generateNavigationBar(const QString &title, + const Node *node, + CodeMarker *marker, + const QString &buildversion, + bool tableItems = false); void generateHeader(const QString& title, const Node *node = 0, CodeMarker *marker = 0); -- cgit v1.2.3 From 06d90c14b4571184c4ae67067ead9292c94ac026 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 31 Aug 2015 12:13:01 +0200 Subject: Doc: A simplified style for rendering docs with QTextBrowser Add a new documentation template, with simplified CSS rules that work better when using QTextBrowser as a backend for Qt Assistant or Qt Creator Help. Select this new template by default for offline documentation builds, but keep the old offline template as part of the template files; use JavaScript to switch to the 'standard' CSS when the generated files are viewed with a web browser. Task-number: QTBUG-48322 Change-Id: Ib197896200bb482935f6e9f3a38976133a1e804d Reviewed-by: Venugopal Shivashankar --- .../qt-html-templates-offline-simple.qdocconf | 40 +++++ doc/global/qt-module-defaults-offline.qdocconf | 6 +- doc/global/template/style/offline-simple.css | 176 +++++++++++++++++++++ 3 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 doc/global/qt-html-templates-offline-simple.qdocconf create mode 100644 doc/global/template/style/offline-simple.css diff --git a/doc/global/qt-html-templates-offline-simple.qdocconf b/doc/global/qt-html-templates-offline-simple.qdocconf new file mode 100644 index 0000000000..b19bdd513f --- /dev/null +++ b/doc/global/qt-html-templates-offline-simple.qdocconf @@ -0,0 +1,40 @@ +#include standard set of HTML header and footer. +include(html-config.qdocconf) +include(html-header-offline.qdocconf) +include(html-footer.qdocconf) + +# Uncomment if navigation bar is not wanted +#HTML.nonavigationbar = "true" + +# Specify a custom CSS file used by this template +HTML.stylesheets += template/style/offline-simple.css +qhp.extraFiles += style/offline-simple.css + +# override the header styles +HTML.headerstyles = \ + " \n" \ + " \n" + +HTML.postheader = \ + "\n" \ + "
    \n"\ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    " + << buildversion << "
    \n" + +HTML.postpostheader = \ + "
    \n"\ + " \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" + +# Add some padding around code snippets, as we cannot +# currectly style them for QTextBrowser using only CSS. +codeindent = 2 +codeprefix = "\n\n" +codesuffix = "\n\n" diff --git a/doc/global/qt-module-defaults-offline.qdocconf b/doc/global/qt-module-defaults-offline.qdocconf index af7afdd96f..36874e8fc1 100644 --- a/doc/global/qt-module-defaults-offline.qdocconf +++ b/doc/global/qt-module-defaults-offline.qdocconf @@ -7,7 +7,11 @@ include(qt-cpp-defines.qdocconf) include(compat.qdocconf) include(manifest-meta.qdocconf) include(fileextensions.qdocconf) -include(qt-html-templates-offline.qdocconf) + +# By default, select the 'simple' offline template, suited for rendering +# HTML with QTextBrowser. +include(qt-html-templates-offline-simple.qdocconf) +#include(qt-html-templates-offline.qdocconf) #extra configuration data such as file extensions include(config.qdocconf) diff --git a/doc/global/template/style/offline-simple.css b/doc/global/template/style/offline-simple.css new file mode 100644 index 0000000000..3e1c527761 --- /dev/null +++ b/doc/global/template/style/offline-simple.css @@ -0,0 +1,176 @@ +body { + font-size: 14px; +} + +pre { + background-color: #f0f0f0; + font-family: Courier, monospace; + font-size: 15px; + font-weight: 600; + vertical-align: top; + margin: 15px 85px 15px 35px; + padding: 25px; + width: 90%; + overflow-x:auto; +} + +pre a[href] { + color: #5caa15; +} + +p { + width: 70%; + margin: 15px 0px 10px 15px; +} + +table p { + margin: 0px; + padding: 0px; +} + +a[href] { + color: #007330; + text-decoration: none; +} + +/* Different color for ext. links */ +a[href|="http://"], a[href|="https://"] { + color: #6bb8db; +} + +h1.title { + margin-top: 30px; + margin-left: 6px; + font-size: 32px; + padding: 6px; +} + +h2, p.h2 { + background-color: #F2F3F4; + padding: 4px; + margin: 30px 0px 20px 10px; +} + +h3 { + font-size: 16px; + margin: 30px 0px 30px 6px; +} + +ul, ol { + margin-top: 4px; + margin-bottom: 0px; +} + +ul li, ol li { + margin-bottom: 8px; +} + +.mainContent li.level2 { + margin-left: 16px; +} + +.rightAlign { + text-align: right; +} + +h3.fn, span.fn { + border-width: 3px; + border-style: solid; + border-color: #aaaaaa; + background-color: #eeeeee; + word-spacing: 3px; + padding: 5px; + text-decoration: none; + font-weight: 400; + font-size: 16px; + margin: 45px 0px 0px 6px; +} + +table { + max-width: 80%; + padding: 15px 45px 15px 15px; +} + +table th { + text-align: left; + padding: 8px; +} + +table td { + padding: 6px 10px 6px 10px; +} + +table tr.odd { + background-color: #eeeeee; +} + +table.qmlname td { + padding: 0px; + margin-left: 6px; + font-size: 16px; +} + +table.qmlname p .name, +h3.fn .name, h3.fn .type { + font-weight: bold; +} + +.context h3.fn { + font-weight: 400; +} + +.qmlreadonly, .qmldefault { + font-family: Courier, monospace; + margin-right: 6px; +} + +tr > td > pre { + font-size: 14px; +} + +code { + font-family: Courier, monospace; + font-size: 16px; + font-weight: 400; +} + +p.naviNextPrevious { + text-align: right; + margin-right: 40px; +} + +q.prevPage, a.nextPage { + margin-left: 30px; + } + +.toc h3 { + margin: 0px 0px 10px 6px; +} + +.toc ul { + list-style-type: none; +} + +.navigationbar table { + padding: 0; + margin: 0; +} + +.navigationbar table tr { + background-color: #eeeeee; +} + +td#buildversion { + background-color: #ffffff; +} + +.footer, .footer p { + padding: 5px 0px 5px 0px; + margin: 45px 15px 5px 15px; + font-size: 10px; + background-color: #cccccc; +} + +.footer p { + margin: 0px; +} -- cgit v1.2.3 From c890fa4787ef82111abdb828bb429e1fd578be41 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 9 Oct 2015 12:38:47 +0200 Subject: Remove webkit-guide from examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qt5WebKit is now deprecated and removed from the packages. Change-Id: I176344cb2a6b43ffc44cc0e7ef1abb4e765a35b4 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Topi Reiniö --- examples/webkit/webkit-guide/_copyright.txt | 40 --- examples/webkit/webkit-guide/_image_assets.htm | 332 --------------------- examples/webkit/webkit-guide/_index.html | 320 -------------------- examples/webkit/webkit-guide/anim_accord.htm | 123 -------- examples/webkit/webkit-guide/anim_demo-rotate.htm | 64 ---- examples/webkit/webkit-guide/anim_demo-scale.htm | 68 ----- examples/webkit/webkit-guide/anim_demo-skew.htm | 62 ---- examples/webkit/webkit-guide/anim_gallery.htm | 115 ------- examples/webkit/webkit-guide/anim_panel.htm | 64 ---- examples/webkit/webkit-guide/anim_pulse.htm | 72 ----- examples/webkit/webkit-guide/anim_skew.htm | 80 ----- examples/webkit/webkit-guide/anim_slide1.htm | 62 ---- examples/webkit/webkit-guide/anim_slide2.htm | 62 ---- examples/webkit/webkit-guide/anim_slide3.htm | 65 ---- examples/webkit/webkit-guide/anim_tabbedSkew.htm | 89 ------ examples/webkit/webkit-guide/css/anim_accord.css | 246 --------------- .../webkit/webkit-guide/css/anim_demo-rotate.css | 95 ------ .../webkit/webkit-guide/css/anim_demo-scale.css | 112 ------- .../webkit/webkit-guide/css/anim_demo-skew.css | 98 ------ examples/webkit/webkit-guide/css/anim_gallery.css | 110 ------- examples/webkit/webkit-guide/css/anim_panel.css | 116 ------- examples/webkit/webkit-guide/css/anim_pulse.css | 100 ------- examples/webkit/webkit-guide/css/anim_skew.css | 186 ------------ examples/webkit/webkit-guide/css/anim_slide.css | 148 --------- .../webkit/webkit-guide/css/anim_tabbedSkew.css | 113 ------- .../webkit/webkit-guide/css/css3_backgrounds.css | 105 ------- .../webkit/webkit-guide/css/css3_border-img.css | 70 ----- .../webkit/webkit-guide/css/css3_grad-radial.css | 66 ---- .../webkit/webkit-guide/css/css3_gradientBack.css | 77 ----- .../webkit-guide/css/css3_gradientBackStop.css | 77 ----- .../webkit-guide/css/css3_gradientButton.css | 88 ------ .../webkit/webkit-guide/css/css3_mask-grad.css | 60 ---- examples/webkit/webkit-guide/css/css3_mask-img.css | 58 ---- examples/webkit/webkit-guide/css/css3_multicol.css | 110 ------- examples/webkit/webkit-guide/css/css3_reflect.css | 127 -------- examples/webkit/webkit-guide/css/css3_scroll.css | 93 ------ examples/webkit/webkit-guide/css/css3_sel-nth.css | 63 ---- examples/webkit/webkit-guide/css/css3_shadow.css | 145 --------- .../webkit/webkit-guide/css/css3_shadowBlur.css | 145 --------- .../webkit/webkit-guide/css/css3_text-overflow.css | 119 -------- .../webkit/webkit-guide/css/css3_text-shadow.css | 67 ----- .../webkit/webkit-guide/css/css3_text-stroke.css | 75 ----- examples/webkit/webkit-guide/css/form_tapper.css | 108 ------- examples/webkit/webkit-guide/css/form_toggler.css | 200 ------------- .../webkit/webkit-guide/css/layout_link-fmt.css | 137 --------- .../webkit/webkit-guide/css/layout_tbl-keyhole.css | 147 --------- examples/webkit/webkit-guide/css/mob_condjs.css | 55 ---- .../webkit/webkit-guide/css/mob_mediaquery.css | 49 --- examples/webkit/webkit-guide/css/mobile.css | 82 ----- examples/webkit/webkit-guide/css/mq_desktop.css | 70 ----- examples/webkit/webkit-guide/css/mq_mobile.css | 69 ----- examples/webkit/webkit-guide/css/mq_touch.css | 69 ----- .../webkit/webkit-guide/css/mqlayout_desktop.css | 92 ------ .../webkit/webkit-guide/css/mqlayout_mobile.css | 82 ----- .../webkit/webkit-guide/css/mqlayout_touch.css | 86 ------ examples/webkit/webkit-guide/css/storage.css | 156 ---------- examples/webkit/webkit-guide/css3_backgrounds.htm | 87 ------ examples/webkit/webkit-guide/css3_border-img.htm | 78 ----- examples/webkit/webkit-guide/css3_grad-radial.htm | 62 ---- examples/webkit/webkit-guide/css3_gradientBack.htm | 79 ----- .../webkit/webkit-guide/css3_gradientBackStop.htm | 93 ------ .../webkit/webkit-guide/css3_gradientButton.htm | 67 ----- examples/webkit/webkit-guide/css3_mask-grad.htm | 67 ----- examples/webkit/webkit-guide/css3_mask-img.htm | 57 ---- examples/webkit/webkit-guide/css3_multicol.htm | 92 ------ examples/webkit/webkit-guide/css3_reflect.htm | 101 ------- examples/webkit/webkit-guide/css3_scroll.htm | 95 ------ examples/webkit/webkit-guide/css3_sel-nth.htm | 81 ----- examples/webkit/webkit-guide/css3_shadow.htm | 79 ----- .../webkit/webkit-guide/css3_text-overflow.htm | 118 -------- examples/webkit/webkit-guide/css3_text-shadow.htm | 75 ----- examples/webkit/webkit-guide/css3_text-stroke.htm | 75 ----- examples/webkit/webkit-guide/form_tapper.htm | 75 ----- examples/webkit/webkit-guide/form_toggler.htm | 141 --------- examples/webkit/webkit-guide/img/border-frame.png | Bin 5534 -> 0 bytes examples/webkit/webkit-guide/img/gal1.jpg | Bin 44584 -> 0 bytes examples/webkit/webkit-guide/img/gal2.jpg | Bin 45495 -> 0 bytes examples/webkit/webkit-guide/img/gal3.jpg | Bin 51291 -> 0 bytes examples/webkit/webkit-guide/img/gal4.jpg | Bin 57195 -> 0 bytes examples/webkit/webkit-guide/img/gal5.jpg | Bin 31293 -> 0 bytes examples/webkit/webkit-guide/img/gal6.jpg | Bin 30854 -> 0 bytes examples/webkit/webkit-guide/img/gal7.jpg | Bin 35211 -> 0 bytes examples/webkit/webkit-guide/img/gal8.jpg | Bin 35269 -> 0 bytes examples/webkit/webkit-guide/img/gradient.jpg | Bin 710 -> 0 bytes .../webkit/webkit-guide/img/gray_icon_close.png | Bin 658 -> 0 bytes examples/webkit/webkit-guide/img/ic_ag_016.png | Bin 598 -> 0 bytes examples/webkit/webkit-guide/img/ic_ag_032.png | Bin 1275 -> 0 bytes examples/webkit/webkit-guide/img/ic_ag_036.png | Bin 1803 -> 0 bytes examples/webkit/webkit-guide/img/ic_ag_048.png | Bin 1885 -> 0 bytes examples/webkit/webkit-guide/img/ic_al_016.png | Bin 625 -> 0 bytes examples/webkit/webkit-guide/img/ic_al_032.png | Bin 1259 -> 0 bytes examples/webkit/webkit-guide/img/ic_al_036.png | Bin 1755 -> 0 bytes examples/webkit/webkit-guide/img/ic_al_048.png | Bin 1795 -> 0 bytes examples/webkit/webkit-guide/img/ic_ar_016.png | Bin 608 -> 0 bytes examples/webkit/webkit-guide/img/ic_ar_032.png | Bin 1233 -> 0 bytes examples/webkit/webkit-guide/img/ic_ar_036.png | Bin 1777 -> 0 bytes examples/webkit/webkit-guide/img/ic_ar_048.png | Bin 1828 -> 0 bytes examples/webkit/webkit-guide/img/ic_b_016.png | Bin 580 -> 0 bytes examples/webkit/webkit-guide/img/ic_b_032.png | Bin 1166 -> 0 bytes examples/webkit/webkit-guide/img/ic_b_036.png | Bin 1668 -> 0 bytes examples/webkit/webkit-guide/img/ic_b_048.png | Bin 1623 -> 0 bytes examples/webkit/webkit-guide/img/ic_be_016.png | Bin 614 -> 0 bytes examples/webkit/webkit-guide/img/ic_be_032.png | Bin 1322 -> 0 bytes examples/webkit/webkit-guide/img/ic_be_036.png | Bin 1811 -> 0 bytes examples/webkit/webkit-guide/img/ic_be_048.png | Bin 1824 -> 0 bytes examples/webkit/webkit-guide/img/ic_c_016.png | Bin 545 -> 0 bytes examples/webkit/webkit-guide/img/ic_c_032.png | Bin 1102 -> 0 bytes examples/webkit/webkit-guide/img/ic_c_036.png | Bin 1595 -> 0 bytes examples/webkit/webkit-guide/img/ic_c_048.png | Bin 1622 -> 0 bytes examples/webkit/webkit-guide/img/ic_ca_016.png | Bin 606 -> 0 bytes examples/webkit/webkit-guide/img/ic_ca_032.png | Bin 1229 -> 0 bytes examples/webkit/webkit-guide/img/ic_ca_036.png | Bin 1771 -> 0 bytes examples/webkit/webkit-guide/img/ic_ca_048.png | Bin 1820 -> 0 bytes examples/webkit/webkit-guide/img/ic_cl_016.png | Bin 602 -> 0 bytes examples/webkit/webkit-guide/img/ic_cl_032.png | Bin 1197 -> 0 bytes examples/webkit/webkit-guide/img/ic_cl_036.png | Bin 1731 -> 0 bytes examples/webkit/webkit-guide/img/ic_cl_048.png | Bin 1816 -> 0 bytes examples/webkit/webkit-guide/img/ic_cu_016.png | Bin 580 -> 0 bytes examples/webkit/webkit-guide/img/ic_cu_032.png | Bin 1183 -> 0 bytes examples/webkit/webkit-guide/img/ic_cu_036.png | Bin 1742 -> 0 bytes examples/webkit/webkit-guide/img/ic_cu_048.png | Bin 1729 -> 0 bytes examples/webkit/webkit-guide/img/ic_f_016.png | Bin 539 -> 0 bytes examples/webkit/webkit-guide/img/ic_f_032.png | Bin 1047 -> 0 bytes examples/webkit/webkit-guide/img/ic_f_036.png | Bin 1487 -> 0 bytes examples/webkit/webkit-guide/img/ic_f_048.png | Bin 1488 -> 0 bytes examples/webkit/webkit-guide/img/ic_fe_016.png | Bin 591 -> 0 bytes examples/webkit/webkit-guide/img/ic_fe_032.png | Bin 1171 -> 0 bytes examples/webkit/webkit-guide/img/ic_fe_036.png | Bin 1726 -> 0 bytes examples/webkit/webkit-guide/img/ic_fe_048.png | Bin 1745 -> 0 bytes examples/webkit/webkit-guide/img/ic_h_016.png | Bin 583 -> 0 bytes examples/webkit/webkit-guide/img/ic_h_032.png | Bin 1135 -> 0 bytes examples/webkit/webkit-guide/img/ic_h_036.png | Bin 1600 -> 0 bytes examples/webkit/webkit-guide/img/ic_h_048.png | Bin 1644 -> 0 bytes examples/webkit/webkit-guide/img/ic_he_016.png | Bin 606 -> 0 bytes examples/webkit/webkit-guide/img/ic_he_032.png | Bin 1179 -> 0 bytes examples/webkit/webkit-guide/img/ic_he_036.png | Bin 1746 -> 0 bytes examples/webkit/webkit-guide/img/ic_he_048.png | Bin 1675 -> 0 bytes examples/webkit/webkit-guide/img/ic_k_016.png | Bin 600 -> 0 bytes examples/webkit/webkit-guide/img/ic_k_032.png | Bin 1189 -> 0 bytes examples/webkit/webkit-guide/img/ic_k_036.png | Bin 1657 -> 0 bytes examples/webkit/webkit-guide/img/ic_k_048.png | Bin 1706 -> 0 bytes examples/webkit/webkit-guide/img/ic_li_016.png | Bin 584 -> 0 bytes examples/webkit/webkit-guide/img/ic_li_032.png | Bin 1125 -> 0 bytes examples/webkit/webkit-guide/img/ic_li_036.png | Bin 1596 -> 0 bytes examples/webkit/webkit-guide/img/ic_li_048.png | Bin 1691 -> 0 bytes examples/webkit/webkit-guide/img/ic_mg_016.png | Bin 628 -> 0 bytes examples/webkit/webkit-guide/img/ic_mg_032.png | Bin 1286 -> 0 bytes examples/webkit/webkit-guide/img/ic_mg_036.png | Bin 1832 -> 0 bytes examples/webkit/webkit-guide/img/ic_mg_048.png | Bin 1908 -> 0 bytes examples/webkit/webkit-guide/img/ic_n_016.png | Bin 605 -> 0 bytes examples/webkit/webkit-guide/img/ic_n_032.png | Bin 1203 -> 0 bytes examples/webkit/webkit-guide/img/ic_n_036.png | Bin 1728 -> 0 bytes examples/webkit/webkit-guide/img/ic_n_048.png | Bin 1718 -> 0 bytes examples/webkit/webkit-guide/img/ic_na_016.png | Bin 609 -> 0 bytes examples/webkit/webkit-guide/img/ic_na_032.png | Bin 1302 -> 0 bytes examples/webkit/webkit-guide/img/ic_na_036.png | Bin 1811 -> 0 bytes examples/webkit/webkit-guide/img/ic_na_048.png | Bin 1879 -> 0 bytes examples/webkit/webkit-guide/img/ic_ne_016.png | Bin 619 -> 0 bytes examples/webkit/webkit-guide/img/ic_ne_032.png | Bin 1278 -> 0 bytes examples/webkit/webkit-guide/img/ic_ne_036.png | Bin 1798 -> 0 bytes examples/webkit/webkit-guide/img/ic_ne_048.png | Bin 1811 -> 0 bytes examples/webkit/webkit-guide/img/ic_ni_016.png | Bin 627 -> 0 bytes examples/webkit/webkit-guide/img/ic_ni_032.png | Bin 1248 -> 0 bytes examples/webkit/webkit-guide/img/ic_ni_036.png | Bin 1805 -> 0 bytes examples/webkit/webkit-guide/img/ic_ni_048.png | Bin 1837 -> 0 bytes examples/webkit/webkit-guide/img/ic_o_016.png | Bin 580 -> 0 bytes examples/webkit/webkit-guide/img/ic_o_032.png | Bin 1182 -> 0 bytes examples/webkit/webkit-guide/img/ic_o_036.png | Bin 1668 -> 0 bytes examples/webkit/webkit-guide/img/ic_o_048.png | Bin 1752 -> 0 bytes examples/webkit/webkit-guide/img/ic_pt_016.png | Bin 600 -> 0 bytes examples/webkit/webkit-guide/img/ic_pt_032.png | Bin 1212 -> 0 bytes examples/webkit/webkit-guide/img/ic_pt_036.png | Bin 1728 -> 0 bytes examples/webkit/webkit-guide/img/ic_pt_048.png | Bin 1675 -> 0 bytes examples/webkit/webkit-guide/img/ic_si_016.png | Bin 588 -> 0 bytes examples/webkit/webkit-guide/img/ic_si_032.png | Bin 1198 -> 0 bytes examples/webkit/webkit-guide/img/ic_si_036.png | Bin 1761 -> 0 bytes examples/webkit/webkit-guide/img/ic_si_048.png | Bin 1820 -> 0 bytes examples/webkit/webkit-guide/img/ic_zn_016.png | Bin 572 -> 0 bytes examples/webkit/webkit-guide/img/ic_zn_032.png | Bin 1164 -> 0 bytes examples/webkit/webkit-guide/img/ic_zn_036.png | Bin 1689 -> 0 bytes examples/webkit/webkit-guide/img/ic_zn_048.png | Bin 1721 -> 0 bytes examples/webkit/webkit-guide/img/icon_check.png | Bin 678 -> 0 bytes .../webkit-guide/img/icon_check_x24green.png | Bin 776 -> 0 bytes examples/webkit/webkit-guide/img/icon_dismiss.png | Bin 613 -> 0 bytes .../webkit/webkit-guide/img/icon_dismiss_x22.png | Bin 539 -> 0 bytes .../webkit/webkit-guide/img/icon_drill-down.png | Bin 605 -> 0 bytes .../webkit-guide/img/icon_drill-down_x32.png | Bin 3593 -> 0 bytes examples/webkit/webkit-guide/img/icon_drill-up.png | Bin 592 -> 0 bytes .../webkit/webkit-guide/img/icon_drill-up_x32.png | Bin 3685 -> 0 bytes .../webkit/webkit-guide/img/icon_expand-nav.png | Bin 675 -> 0 bytes .../webkit-guide/img/icon_head-collapsed.png | Bin 285 -> 0 bytes .../webkit-guide/img/icon_head-collapsed_x13.png | Bin 201 -> 0 bytes .../webkit/webkit-guide/img/icon_head-expanded.png | Bin 295 -> 0 bytes .../webkit-guide/img/icon_head-expanded_x13.png | Bin 3017 -> 0 bytes examples/webkit/webkit-guide/img/icon_info.png | Bin 512 -> 0 bytes examples/webkit/webkit-guide/img/icon_info_x24.png | Bin 652 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-doc.png | Bin 610 -> 0 bytes .../webkit/webkit-guide/img/icon_link-email.png | Bin 542 -> 0 bytes .../webkit/webkit-guide/img/icon_link-external.png | Bin 1106 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-pdf.png | Bin 637 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-ppt.png | Bin 536 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-rss.png | Bin 684 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-sms.png | Bin 1086 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-tel.png | Bin 1205 -> 0 bytes examples/webkit/webkit-guide/img/icon_link-xls.png | Bin 603 -> 0 bytes examples/webkit/webkit-guide/img/icon_list-all.png | Bin 545 -> 0 bytes .../webkit/webkit-guide/img/icon_list-all_circ.png | Bin 665 -> 0 bytes .../webkit/webkit-guide/img/icon_nav-start.png | Bin 594 -> 0 bytes examples/webkit/webkit-guide/img/icon_nav-top.png | Bin 634 -> 0 bytes examples/webkit/webkit-guide/img/icon_nav-up.png | Bin 551 -> 0 bytes examples/webkit/webkit-guide/img/icon_nav_end.png | Bin 643 -> 0 bytes examples/webkit/webkit-guide/img/icon_question.png | Bin 802 -> 0 bytes .../webkit/webkit-guide/img/icon_scroll-left.png | Bin 660 -> 0 bytes .../webkit/webkit-guide/img/icon_scroll-right.png | Bin 682 -> 0 bytes examples/webkit/webkit-guide/img/icon_trash.png | Bin 717 -> 0 bytes examples/webkit/webkit-guide/img/land1.jpg | Bin 40695 -> 0 bytes examples/webkit/webkit-guide/img/land2.jpg | Bin 38387 -> 0 bytes examples/webkit/webkit-guide/img/land3.jpg | Bin 27180 -> 0 bytes examples/webkit/webkit-guide/img/land4.jpg | Bin 45132 -> 0 bytes examples/webkit/webkit-guide/img/land5.jpg | Bin 85110 -> 0 bytes examples/webkit/webkit-guide/img/land6.jpg | Bin 38369 -> 0 bytes examples/webkit/webkit-guide/img/land7.jpg | Bin 38923 -> 0 bytes examples/webkit/webkit-guide/img/land8.jpg | Bin 54475 -> 0 bytes examples/webkit/webkit-guide/img/mask.png | Bin 5842 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal1.jpg | Bin 44584 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal2.jpg | Bin 45495 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal3.jpg | Bin 51291 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal4.jpg | Bin 57195 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal5.jpg | Bin 31293 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal6.jpg | Bin 30854 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal7.jpg | Bin 35211 -> 0 bytes examples/webkit/webkit-guide/img/tmp/gal8.jpg | Bin 35269 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land1.jpg | Bin 40695 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land2.jpg | Bin 38387 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land3.jpg | Bin 27180 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land4.jpg | Bin 45132 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land5.jpg | Bin 85110 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land6.jpg | Bin 38369 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land7.jpg | Bin 38923 -> 0 bytes examples/webkit/webkit-guide/img/tmp/land8.jpg | Bin 54475 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal1.png | Bin 16437 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal2.png | Bin 14736 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal3.png | Bin 15882 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal4.png | Bin 18863 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal5.png | Bin 15854 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal6.png | Bin 17339 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal7.png | Bin 17102 -> 0 bytes examples/webkit/webkit-guide/img/tnail_gal8.png | Bin 17933 -> 0 bytes examples/webkit/webkit-guide/js/anim_accord.js | 78 ----- examples/webkit/webkit-guide/js/anim_gallery.js | 79 ----- examples/webkit/webkit-guide/js/anim_panel.js | 53 ---- examples/webkit/webkit-guide/js/anim_skew.js | 97 ------ .../webkit/webkit-guide/js/css3_backgrounds.js | 49 --- examples/webkit/webkit-guide/js/css3_border-img.js | 44 --- .../webkit/webkit-guide/js/css3_grad-radial.js | 75 ----- examples/webkit/webkit-guide/js/css3_mask-grad.js | 44 --- examples/webkit/webkit-guide/js/css3_mask-img.js | 44 --- .../webkit/webkit-guide/js/css3_text-overflow.js | 54 ---- examples/webkit/webkit-guide/js/form_tapper.js | 57 ---- examples/webkit/webkit-guide/js/mob_condjs.js | 79 ----- examples/webkit/webkit-guide/js/mobile.js | 50 ---- examples/webkit/webkit-guide/js/storage.js | 94 ------ examples/webkit/webkit-guide/layout_link-fmt.htm | 82 ----- .../webkit/webkit-guide/layout_tbl-keyhole.htm | 142 --------- examples/webkit/webkit-guide/mob_condjs.htm | 66 ---- examples/webkit/webkit-guide/mob_layout.htm | 60 ---- examples/webkit/webkit-guide/mob_mediaquery.htm | 60 ---- examples/webkit/webkit-guide/storage.htm | 72 ----- examples/webkit/webkit-guide/webkit-guide.pro | 256 ---------------- 269 files changed, 9046 deletions(-) delete mode 100644 examples/webkit/webkit-guide/_copyright.txt delete mode 100644 examples/webkit/webkit-guide/_image_assets.htm delete mode 100644 examples/webkit/webkit-guide/_index.html delete mode 100644 examples/webkit/webkit-guide/anim_accord.htm delete mode 100644 examples/webkit/webkit-guide/anim_demo-rotate.htm delete mode 100644 examples/webkit/webkit-guide/anim_demo-scale.htm delete mode 100644 examples/webkit/webkit-guide/anim_demo-skew.htm delete mode 100644 examples/webkit/webkit-guide/anim_gallery.htm delete mode 100644 examples/webkit/webkit-guide/anim_panel.htm delete mode 100644 examples/webkit/webkit-guide/anim_pulse.htm delete mode 100644 examples/webkit/webkit-guide/anim_skew.htm delete mode 100644 examples/webkit/webkit-guide/anim_slide1.htm delete mode 100644 examples/webkit/webkit-guide/anim_slide2.htm delete mode 100644 examples/webkit/webkit-guide/anim_slide3.htm delete mode 100644 examples/webkit/webkit-guide/anim_tabbedSkew.htm delete mode 100644 examples/webkit/webkit-guide/css/anim_accord.css delete mode 100644 examples/webkit/webkit-guide/css/anim_demo-rotate.css delete mode 100644 examples/webkit/webkit-guide/css/anim_demo-scale.css delete mode 100644 examples/webkit/webkit-guide/css/anim_demo-skew.css delete mode 100644 examples/webkit/webkit-guide/css/anim_gallery.css delete mode 100644 examples/webkit/webkit-guide/css/anim_panel.css delete mode 100644 examples/webkit/webkit-guide/css/anim_pulse.css delete mode 100644 examples/webkit/webkit-guide/css/anim_skew.css delete mode 100644 examples/webkit/webkit-guide/css/anim_slide.css delete mode 100644 examples/webkit/webkit-guide/css/anim_tabbedSkew.css delete mode 100644 examples/webkit/webkit-guide/css/css3_backgrounds.css delete mode 100644 examples/webkit/webkit-guide/css/css3_border-img.css delete mode 100644 examples/webkit/webkit-guide/css/css3_grad-radial.css delete mode 100644 examples/webkit/webkit-guide/css/css3_gradientBack.css delete mode 100644 examples/webkit/webkit-guide/css/css3_gradientBackStop.css delete mode 100644 examples/webkit/webkit-guide/css/css3_gradientButton.css delete mode 100644 examples/webkit/webkit-guide/css/css3_mask-grad.css delete mode 100644 examples/webkit/webkit-guide/css/css3_mask-img.css delete mode 100644 examples/webkit/webkit-guide/css/css3_multicol.css delete mode 100644 examples/webkit/webkit-guide/css/css3_reflect.css delete mode 100644 examples/webkit/webkit-guide/css/css3_scroll.css delete mode 100644 examples/webkit/webkit-guide/css/css3_sel-nth.css delete mode 100644 examples/webkit/webkit-guide/css/css3_shadow.css delete mode 100644 examples/webkit/webkit-guide/css/css3_shadowBlur.css delete mode 100644 examples/webkit/webkit-guide/css/css3_text-overflow.css delete mode 100644 examples/webkit/webkit-guide/css/css3_text-shadow.css delete mode 100644 examples/webkit/webkit-guide/css/css3_text-stroke.css delete mode 100644 examples/webkit/webkit-guide/css/form_tapper.css delete mode 100644 examples/webkit/webkit-guide/css/form_toggler.css delete mode 100644 examples/webkit/webkit-guide/css/layout_link-fmt.css delete mode 100644 examples/webkit/webkit-guide/css/layout_tbl-keyhole.css delete mode 100644 examples/webkit/webkit-guide/css/mob_condjs.css delete mode 100644 examples/webkit/webkit-guide/css/mob_mediaquery.css delete mode 100644 examples/webkit/webkit-guide/css/mobile.css delete mode 100644 examples/webkit/webkit-guide/css/mq_desktop.css delete mode 100644 examples/webkit/webkit-guide/css/mq_mobile.css delete mode 100644 examples/webkit/webkit-guide/css/mq_touch.css delete mode 100644 examples/webkit/webkit-guide/css/mqlayout_desktop.css delete mode 100644 examples/webkit/webkit-guide/css/mqlayout_mobile.css delete mode 100644 examples/webkit/webkit-guide/css/mqlayout_touch.css delete mode 100644 examples/webkit/webkit-guide/css/storage.css delete mode 100644 examples/webkit/webkit-guide/css3_backgrounds.htm delete mode 100644 examples/webkit/webkit-guide/css3_border-img.htm delete mode 100644 examples/webkit/webkit-guide/css3_grad-radial.htm delete mode 100644 examples/webkit/webkit-guide/css3_gradientBack.htm delete mode 100644 examples/webkit/webkit-guide/css3_gradientBackStop.htm delete mode 100644 examples/webkit/webkit-guide/css3_gradientButton.htm delete mode 100644 examples/webkit/webkit-guide/css3_mask-grad.htm delete mode 100644 examples/webkit/webkit-guide/css3_mask-img.htm delete mode 100644 examples/webkit/webkit-guide/css3_multicol.htm delete mode 100644 examples/webkit/webkit-guide/css3_reflect.htm delete mode 100644 examples/webkit/webkit-guide/css3_scroll.htm delete mode 100644 examples/webkit/webkit-guide/css3_sel-nth.htm delete mode 100644 examples/webkit/webkit-guide/css3_shadow.htm delete mode 100644 examples/webkit/webkit-guide/css3_text-overflow.htm delete mode 100644 examples/webkit/webkit-guide/css3_text-shadow.htm delete mode 100644 examples/webkit/webkit-guide/css3_text-stroke.htm delete mode 100644 examples/webkit/webkit-guide/form_tapper.htm delete mode 100644 examples/webkit/webkit-guide/form_toggler.htm delete mode 100644 examples/webkit/webkit-guide/img/border-frame.png delete mode 100644 examples/webkit/webkit-guide/img/gal1.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal2.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal3.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal4.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal5.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal6.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal7.jpg delete mode 100644 examples/webkit/webkit-guide/img/gal8.jpg delete mode 100644 examples/webkit/webkit-guide/img/gradient.jpg delete mode 100644 examples/webkit/webkit-guide/img/gray_icon_close.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ag_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ag_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ag_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ag_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_al_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_al_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_al_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_al_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ar_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ar_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ar_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ar_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_b_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_b_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_b_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_b_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_be_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_be_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_be_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_be_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_c_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_c_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_c_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_c_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ca_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ca_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ca_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ca_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cl_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cl_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cl_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cl_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cu_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cu_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cu_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_cu_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_f_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_f_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_f_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_f_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_fe_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_fe_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_fe_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_fe_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_h_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_h_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_h_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_h_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_he_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_he_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_he_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_he_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_k_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_k_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_k_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_k_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_li_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_li_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_li_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_li_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_mg_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_mg_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_mg_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_mg_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_n_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_n_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_n_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_n_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_na_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_na_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_na_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_na_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ne_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ne_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ne_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ne_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ni_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ni_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ni_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_ni_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_o_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_o_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_o_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_o_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_pt_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_pt_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_pt_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_pt_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_si_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_si_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_si_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_si_048.png delete mode 100644 examples/webkit/webkit-guide/img/ic_zn_016.png delete mode 100644 examples/webkit/webkit-guide/img/ic_zn_032.png delete mode 100644 examples/webkit/webkit-guide/img/ic_zn_036.png delete mode 100644 examples/webkit/webkit-guide/img/ic_zn_048.png delete mode 100644 examples/webkit/webkit-guide/img/icon_check.png delete mode 100644 examples/webkit/webkit-guide/img/icon_check_x24green.png delete mode 100644 examples/webkit/webkit-guide/img/icon_dismiss.png delete mode 100644 examples/webkit/webkit-guide/img/icon_dismiss_x22.png delete mode 100644 examples/webkit/webkit-guide/img/icon_drill-down.png delete mode 100644 examples/webkit/webkit-guide/img/icon_drill-down_x32.png delete mode 100644 examples/webkit/webkit-guide/img/icon_drill-up.png delete mode 100644 examples/webkit/webkit-guide/img/icon_drill-up_x32.png delete mode 100644 examples/webkit/webkit-guide/img/icon_expand-nav.png delete mode 100644 examples/webkit/webkit-guide/img/icon_head-collapsed.png delete mode 100644 examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png delete mode 100644 examples/webkit/webkit-guide/img/icon_head-expanded.png delete mode 100644 examples/webkit/webkit-guide/img/icon_head-expanded_x13.png delete mode 100644 examples/webkit/webkit-guide/img/icon_info.png delete mode 100644 examples/webkit/webkit-guide/img/icon_info_x24.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-doc.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-email.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-external.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-pdf.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-ppt.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-rss.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-sms.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-tel.png delete mode 100644 examples/webkit/webkit-guide/img/icon_link-xls.png delete mode 100644 examples/webkit/webkit-guide/img/icon_list-all.png delete mode 100644 examples/webkit/webkit-guide/img/icon_list-all_circ.png delete mode 100644 examples/webkit/webkit-guide/img/icon_nav-start.png delete mode 100644 examples/webkit/webkit-guide/img/icon_nav-top.png delete mode 100644 examples/webkit/webkit-guide/img/icon_nav-up.png delete mode 100644 examples/webkit/webkit-guide/img/icon_nav_end.png delete mode 100644 examples/webkit/webkit-guide/img/icon_question.png delete mode 100644 examples/webkit/webkit-guide/img/icon_scroll-left.png delete mode 100644 examples/webkit/webkit-guide/img/icon_scroll-right.png delete mode 100644 examples/webkit/webkit-guide/img/icon_trash.png delete mode 100644 examples/webkit/webkit-guide/img/land1.jpg delete mode 100644 examples/webkit/webkit-guide/img/land2.jpg delete mode 100644 examples/webkit/webkit-guide/img/land3.jpg delete mode 100644 examples/webkit/webkit-guide/img/land4.jpg delete mode 100644 examples/webkit/webkit-guide/img/land5.jpg delete mode 100644 examples/webkit/webkit-guide/img/land6.jpg delete mode 100644 examples/webkit/webkit-guide/img/land7.jpg delete mode 100644 examples/webkit/webkit-guide/img/land8.jpg delete mode 100644 examples/webkit/webkit-guide/img/mask.png delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal1.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal2.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal3.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal4.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal5.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal6.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal7.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/gal8.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land1.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land2.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land3.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land4.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land5.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land6.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land7.jpg delete mode 100644 examples/webkit/webkit-guide/img/tmp/land8.jpg delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal1.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal2.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal3.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal4.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal5.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal6.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal7.png delete mode 100644 examples/webkit/webkit-guide/img/tnail_gal8.png delete mode 100644 examples/webkit/webkit-guide/js/anim_accord.js delete mode 100644 examples/webkit/webkit-guide/js/anim_gallery.js delete mode 100644 examples/webkit/webkit-guide/js/anim_panel.js delete mode 100644 examples/webkit/webkit-guide/js/anim_skew.js delete mode 100644 examples/webkit/webkit-guide/js/css3_backgrounds.js delete mode 100644 examples/webkit/webkit-guide/js/css3_border-img.js delete mode 100644 examples/webkit/webkit-guide/js/css3_grad-radial.js delete mode 100644 examples/webkit/webkit-guide/js/css3_mask-grad.js delete mode 100644 examples/webkit/webkit-guide/js/css3_mask-img.js delete mode 100644 examples/webkit/webkit-guide/js/css3_text-overflow.js delete mode 100644 examples/webkit/webkit-guide/js/form_tapper.js delete mode 100644 examples/webkit/webkit-guide/js/mob_condjs.js delete mode 100644 examples/webkit/webkit-guide/js/mobile.js delete mode 100644 examples/webkit/webkit-guide/js/storage.js delete mode 100644 examples/webkit/webkit-guide/layout_link-fmt.htm delete mode 100644 examples/webkit/webkit-guide/layout_tbl-keyhole.htm delete mode 100644 examples/webkit/webkit-guide/mob_condjs.htm delete mode 100644 examples/webkit/webkit-guide/mob_layout.htm delete mode 100644 examples/webkit/webkit-guide/mob_mediaquery.htm delete mode 100644 examples/webkit/webkit-guide/storage.htm delete mode 100644 examples/webkit/webkit-guide/webkit-guide.pro diff --git a/examples/webkit/webkit-guide/_copyright.txt b/examples/webkit/webkit-guide/_copyright.txt deleted file mode 100644 index 32e0d2f918..0000000000 --- a/examples/webkit/webkit-guide/_copyright.txt +++ /dev/null @@ -1,40 +0,0 @@ - - -\1 diff --git a/examples/webkit/webkit-guide/_image_assets.htm b/examples/webkit/webkit-guide/_image_assets.htm deleted file mode 100644 index e3699f22bb..0000000000 --- a/examples/webkit/webkit-guide/_image_assets.htm +++ /dev/null @@ -1,332 +0,0 @@ - - - - - -image assets - - - - - -

    image assets

    - -Notes: - -
      - -
    • Some of these may be redundant; feel free to merge - -
    • Feel free to rename files, but give me before & after list of filenames so I can reflect the change - -
    • use neutral grayscale if possible - -
    • use PNG file format if possible - -
    • I plan to cut new set of generic icons -(e.g., HERE to be white text on darkish -gray, probably #777777) - -
    • No more need for online/offline indicators (red/green circles) for -this draft. - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FILENAMEIMAGE (thumbnail & link)USED ON PAGEDESCRIPTION
    icon_dismiss.png,
    icon_dismiss_x22.png
    - - - -HERE -HERE -HERE -HERE -Dismiss panel or listed item
    icon_expand-nav.pngHEREexpand complex set of navigation options
    icon_nav-up.pngHEREnavigate within listings (up arrow also serves as down arrow using rotate transform)
    icon_drill-up.png,
    icon_drill-up_x32.png
    - - -HEREnavigate up one level within sliding drilldown UI
    icon_drill-down.png,
    icon_drill-down_x32.png
    - - -HEREnavigate down one level within sliding drilldown UI
    icon_scroll-left.pngHEREcustom horizontal scroll button
    icon_scroll-right.pngHEREcustom horizontal scroll button
    icon_head-expanded.png,
    icon_head-expanded_x13.png
    - - -HERE -HEREmarks accordion heading expanded state
    icon_head-collapsed.png,
    icon_head-collapsed_x13.png
    - - -HERE -HEREmarks accordion heading collapsed state
    icon_info.png,
    icon_info_x24.png
    - - -HERElink to panel specifying user preferences
    icon_list-all.png,
    icon_list-all_circ.png
    - - -HEREwithin UI listing items users can filter by category, this indicates LIST ALL ITEMS
    gradient.jpgHEREserves as background for expanded accordion heads (demonstrates CSS's >1 background image feature)
    border-frame.pngHEREborder around chunk of text (got this from Wei Lu's sample; simply demo's this feature)
    mask.pngHEREUsed as a gradient to mask an image; think I got this one from webkit.org
    icon_check.png,
    icon_check_x24green.png
    - - -HEREThis is not available as a separate file; it's specified within -CSS using the "data:" URL scheme. It indicates radio/checkbox -selection state within tappable UI; keep green if possible to match -border
    FILE FORMATS
    icon_link-sms.pngHEREprovides visual hint marking context of hyperlink, in this case a link to initiate an instant message
    icon_link-tel.pngHERE...link to make phone call
    icon_link-xls.pngHERE...link to excel file
    icon_link-doc.pngHERE...link to MS Word file
    icon_link-email.pngHERE...email link
    icon_link-external.pngHERE...link to web page external to current site
    icon_link-pdf.pngHERE...loink to PDF file
    icon_link-ppt.pngHERE...link to PowerPoint file
    icon_link-rss.pngHERE...link to RSS feed
    UNUSED
    icon_nav-top.png
    icon_nav-start.png
    icon_nav_end.png
    icon_question.png
    icon_trash.png
    - - - diff --git a/examples/webkit/webkit-guide/_index.html b/examples/webkit/webkit-guide/_index.html deleted file mode 100644 index d683c0508e..0000000000 --- a/examples/webkit/webkit-guide/_index.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - CSS: SAMPLE PAGES - - - - - - - - - - - -
    -
    - -
    -
    - -
    -
    - -
    - -
    -
    -
    - -

    CSS: SAMPLE PAGES

    - - -
    - -

    CSS: SAMPLE PAGES

    - -

    1. Media Queries

    -
      -
    1. MEDIA-QUERY, BASIC: produces message indicating browser class (desktop/touch/low-end mobile)
    2. -
    3. MEDIA-QUERY, LAYOUT: same, but produces various skeletal layouts using media query criteria; large 3-column layout must appear only on desktop browser
    4. -
    5. MEDIA-QUERY, STYLEMEDIA: Same as #1, but JS produces corresponding message via StyleMedia API
    6. -
    - -

    2. Selectors

    -
      -
    1. SELECTOR, ATTRIBUTE PREFIX/SUFFIX: links appear w/different icons based on URL prefix/suffix; linebreaks should not appear within inline links
    2. -
    3. SELECTOR, FORMS, TAP: radio/checkbox inputs can be tapped (only 1 at a time within 'radio' set; any number within 'checkbox' set)
    4. -
    5. SELECTOR, FORMS, TOGGLE: radio/checkbox inputs can be toggled (only 1 at a time within 'radio' inputs; any number within 'checkbox' inputs); 2 "binary" examples at bottom use custom text
    6. -
    7. SELECTOR, NAVIGATIONAL, TABLE: pressing "view listings" displays stacked table rows, one at a time
    8. -
    9. SELECTOR, POSITIONAL: displays 4x6 icon grid, implemted via nth-of-type()
    10. -
    - -

    3. Visual Effects

    -
      -
    1. CSS, BACKGROUNDS: selected accordion tabs display both gradient background and icon; unselected only displays icon; uses scaleY transition
    2. -
    3. CSS, BORDER IMAGE: border image surrounds box
    4. -
    5. CSS, BOX-SHADOW, PLAIN: nav element has shadow; icons appear smaller while pressed
    6. -
    7. CSS, GRADIENT, BACKGROUND: background fades vertically from light to dark
    8. -
    9. CSS, GRADIENT, BACKGROUND, COLOR-STOP: as you scroll down page, background fades vertically from dark to light and back to dark again
    10. -
    11. CSS, GRADIENT, BUTTON: buttons appear with vertical shading, appearing w/inverted gradient when pressed
    12. -
    13. CSS, GRADIENT, RADIAL: touching within box produces colorful *splat* effect for duration of touch
    14. -
    15. CSS, MASK, GRADIENT: images appear w/gradient; touching them removes gradient
    16. -
    17. CSS, MASK, IMAGE: image fills screen but fades to black around the edges
    18. -
    19. CSS, REFLECTION: heading and image both appear w/mirror reflections along bottom
    20. -
    21. CSS, SCROLLBARS: code block scrollable via big buttons
    22. -
    23. CSS, TEXT-OVERFLOW: items appear w/ellipses; touching them expands them; pressing (X) collapses them
    24. -
    25. CSS, TEXT-SHADOW: heading text appears with shadow
    26. -
    27. CSS, TEXT-STROKE: first heading appears w/black outline
    28. -
    - -

    4. Dynamic CSS

    -
      -
    1. ANIMATION, DEMO, ROTATE: animated demo of rotating boxes
    2. -
    3. ANIMATION, DEMO, SCALE: animated demo of shrinking/expanding box
    4. -
    5. ANIMATION, DEMO, SKEW: animated demo of box being pushed and piulled around
    6. -
    7. ANIMATION, KEYFRAME, PULSE: pressing icons causes them to pulse indefinitely
    8. -
    9. ANIMATION, KEYFRAME, SLIDING: drill-down menus
    10. -
    11. ANIMATION, KEYFRAME, BANNER: banner scrolls through 5 colorful items
    12. -
    13. ANIMATION, TRANSFORM, SKEWED TABS: touching parts of cube displays different tabbed text
    14. -
    15. ANIMATION, TRANSITION, CHAINED, ACCORDION: tapping icon animates in collapsed accordions; tapping them animates in display of subheads; tapping anywhere else reverses animation sequence, collapsing back to initial icon
    16. -
    17. ANIMATION, TRANSITION, MAX-WIDTH, PANEL: pressing icon animates to expand panel of choices; pressing anywhere collapses panel back down to initial icon
    18. -
    19. ANIMATION, TRANSITION, SKEW: tapping items causes them to wipe off right edge w/skew effect; remainder re-pack vertically; touching each category icon removes non-matching items and drops down matching ones
    20. -
    21. ANIMATION, TRANSITION, TRANSLATE, GALLERY: tapping images adjacent to main image animates them in; tapping current image flips to display text; w/text displaying, tapping adjacent image animates both effects @ same time
    22. -
    - - -

    5. Storage

    - -
      -
    1. LOCAL/SESSION STORAGE: -When opened for first time, form opens featuring -login/password/credit-card fields. Fill them out. Each input's -background will go pink if input is invalid. Login & password -validate simply as "required" so any string will do. Credit card -validates as 16-digit numeral. After filling out, press dismiss box. -Then quit & reopen browser, go back to page, and press (i) info icon -to get back into form. login/password should be same as initially -entered (localStorage), but credit-card data s/b absent -(sessionStorage). - -
    2. -
    - -
    - - -
    -
    -
    -
    - -
    -
    - -
    -
    X
    -
    -

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and - requests, please use the Qt Bug Tracker.

    -

    -

    -
    -
    -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/anim_accord.htm b/examples/webkit/webkit-guide/anim_accord.htm deleted file mode 100644 index 237457ce73..0000000000 --- a/examples/webkit/webkit-guide/anim_accord.htm +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - -Nested Accordion - - - -
    -
    - - - -

    Nested Accordion

    - -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    - -
    -
    - - - - - diff --git a/examples/webkit/webkit-guide/anim_demo-rotate.htm b/examples/webkit/webkit-guide/anim_demo-rotate.htm deleted file mode 100644 index 48df70b6aa..0000000000 --- a/examples/webkit/webkit-guide/anim_demo-rotate.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - -transforms: rotate - - - - -
    -Rotate: from 0 to 180°, then to 360°
    (Origin: center) -
    - -
    -Rotate: from 0 to -180°, then to -360°
    (Origin: top left) -
    - -
    -(The End) -
    - - - - diff --git a/examples/webkit/webkit-guide/anim_demo-scale.htm b/examples/webkit/webkit-guide/anim_demo-scale.htm deleted file mode 100644 index 8d5320a471..0000000000 --- a/examples/webkit/webkit-guide/anim_demo-scale.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - -transforms: scale - - - - -
    -Scale: from 0 to 0.5, to 1.5 and back.
    (Origin: bottom) -
    - -
    -ScaleX: from 0 to 0.5, to 1.5 and back.
    (Origin: left) -
    - -
    -ScaleY: from 0 to 0.5, to 1.5 and back.
    (Origin: center) -
    - -
    -(The End) -
    - - - - diff --git a/examples/webkit/webkit-guide/anim_demo-skew.htm b/examples/webkit/webkit-guide/anim_demo-skew.htm deleted file mode 100644 index b167600f09..0000000000 --- a/examples/webkit/webkit-guide/anim_demo-skew.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - -transforms: skew - - - -
    -Skew: from 30° to -30° and back.
    (Origin: bottom) -
    - -
    -SkewY: from 30° to -30° and back.
    (Origin: left) -
    - -
    -(The End) -
    - - - - diff --git a/examples/webkit/webkit-guide/anim_gallery.htm b/examples/webkit/webkit-guide/anim_gallery.htm deleted file mode 100644 index 4320d6dd16..0000000000 --- a/examples/webkit/webkit-guide/anim_gallery.htm +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -Image Gallery - - - - - - - diff --git a/examples/webkit/webkit-guide/anim_panel.htm b/examples/webkit/webkit-guide/anim_panel.htm deleted file mode 100644 index fe2c7e29be..0000000000 --- a/examples/webkit/webkit-guide/anim_panel.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - -Animated Slide-out Panel - - - -
    - -
    Press the icon, then choose an option if you wish.
    -
    - - - diff --git a/examples/webkit/webkit-guide/anim_pulse.htm b/examples/webkit/webkit-guide/anim_pulse.htm deleted file mode 100644 index 6e354cf229..0000000000 --- a/examples/webkit/webkit-guide/anim_pulse.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - -Animated Pulse - - - -
    -
    - -

    Animated Pulse

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. -

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/anim_skew.htm b/examples/webkit/webkit-guide/anim_skew.htm deleted file mode 100644 index 99a9a9cc65..0000000000 --- a/examples/webkit/webkit-guide/anim_skew.htm +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -Transitions with Skew Transforms - - - - -
    -
    Item #1
    -
    Item #2
    -
    Item #3
    -
    Item #4
    -
    Item #5
    -
    Item #6
    -
    Item #7
    -
    Item #8
    -
    Item #9
    -
    Item #10
    -
    Item #11
    -
    Item #12
    -
    Item #13
    -
    Item #14
    -
    Item #15
    -
    - - - - - - - diff --git a/examples/webkit/webkit-guide/anim_slide1.htm b/examples/webkit/webkit-guide/anim_slide1.htm deleted file mode 100644 index e017037b72..0000000000 --- a/examples/webkit/webkit-guide/anim_slide1.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - -Animated Drilldown Sliders - - - - - - - - diff --git a/examples/webkit/webkit-guide/anim_slide2.htm b/examples/webkit/webkit-guide/anim_slide2.htm deleted file mode 100644 index b5275287ca..0000000000 --- a/examples/webkit/webkit-guide/anim_slide2.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - -Animated Drilldown Sliders - - - - - - - - diff --git a/examples/webkit/webkit-guide/anim_slide3.htm b/examples/webkit/webkit-guide/anim_slide3.htm deleted file mode 100644 index 70693dc25e..0000000000 --- a/examples/webkit/webkit-guide/anim_slide3.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - - -Animated Drilldown Sliders - - - - -
    -

    Level 3

    - - - -
    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. -
    - -
    - - - diff --git a/examples/webkit/webkit-guide/anim_tabbedSkew.htm b/examples/webkit/webkit-guide/anim_tabbedSkew.htm deleted file mode 100644 index 0bf2eb6a4e..0000000000 --- a/examples/webkit/webkit-guide/anim_tabbedSkew.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - -Transformed Tabs - - - -
    - -
    -

    Tab #1

    -
     
    -

    Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis -ante, id mollis risus lectus ornare nisl. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Donec feugiat gravida viverra. Vivamus -ipsum felis, cursus sed venenatis nec, tempus ac tellus. Aenean -elementum arcu sed nibh faucibus pellentesque.

    -
    -
    -

    Tab #2

    -
     
    - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. - -
    -
    -

    Tab #3

    -
     
    - -Donec feugiat gravida viverra. Vivamus ipsum felis, cursus sed -venenatis nec, tempus ac tellus. Praesent luctus, risus eu vestibulum -mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl. -Nullam et turpis diam. Aenean vestibulum egestas metus, eu sodales -dolor venenatis quis. Aenean augue orci, facilisis et convallis ut, -egestas at neque. - -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css/anim_accord.css b/examples/webkit/webkit-guide/css/anim_accord.css deleted file mode 100644 index f65d05d783..0000000000 --- a/examples/webkit/webkit-guide/css/anim_accord.css +++ /dev/null @@ -1,246 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -body { - background : #aaaaaa; - font-family : sans-serif; - width : 100; -} - -body > section { - border-radius : 1em; - background : #ffffff; - border-radius : 1em; - padding : 1em; - background : #ffffff; - min-height : 70%; -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - -.nav > a { - display : inline-block; - width : 48px; - height : 48px; -} - -h1, h2, h3, h4 { - margin-top : 0.0em; - font-size : smaller; - padding-top : 1em; -} - -body > section.main { - position : absolute; - left : 1em; - right : 1em; - top : 1em; - min-height : 50%; - border-radius : 0.5em; - background : #aaaaaa; - padding : 0; -} - -section.main > article { - background : #ffffff; - padding : 1em; - margin-bottom : 10em; - border-radius : 0.5em; -} - -#accordion, -#accordion > dt, -#accordion > dd, -{ - display : block; -} - -#accordion > dt { - border-top : thin solid #777777; -} - -#accordion > dd { - border-bottom : thin solid #777777; -} - -#accordion > dd { - background-image : -webkit-gradient(linear,center top,center bottom,from(#aaaaaa),to(#ffffff)); -} - -#accordion.collapsed { - background-size : auto; - background-image : url(../img/icon_expand-nav.png); - background-repeat : no-repeat; - background-position : 0.25em 0.25em; -} - -#accordion { - position : absolute;; - right : 2em; - top : 0em; - overflow : hidden; - background : #ffffff; - cursor : pointer; - z-index : 100; - font-weight : bold; -} - -#accordion.expanded { - border : thin solid #206ead; - width : 80%; - height : 90%; - -webkit-transition: - width 0.5s ease-in-out 0.0s, - height 0.5s ease-in-out 0.5s - ; -} - -#accordion.collapsed { - width : 15%; - height : 9%; - -webkit-transition: - height 0.5s ease-in-out 0.0s, - width 0.5s ease-in-out 0.5s - ; -} - -#accordion.collapsed > dt, -#accordion.collapsed > dd { - -webkit-transform : translate(100%); - -webkit-transition : -webkit-transform 0.5s ease-in-out 0.5s; -} - -#accordion.expanded > dt, -#accordion.expanded > dd { - -webkit-transform : translate(0%); - -webkit-transition : -webkit-transform 0.5s ease-in-out 0.0s; -} - -#accordion > dt > a { - margin-left : 0.5em; -} - -#accordion > dt , -#accordion > dd { - padding : 0.5em; -} - -#accordion > dt ~ dd { - margin : 0; -} - -#accordion > dd > ul, -#accordion > dd > ul > li -{ - padding : 0; - margin : 0; -} - -#accordion a, -#accordion a:active, -#accordion a:hover, -#accordion a:visited -{ - text-decoration : none; - color : #000000; -} - -#accordion > dt.expanded:before { - content : url(../img/icon_head-expanded_x13.png); -} - -#accordion > dt.collapsed:before { - content : url(../img/icon_head-collapsed_x13.png); -} - -#accordion > dt.expanded { - background-image : -webkit-gradient(linear, center top, center bottom, from(#aaaaaa), to(#ffffff)); -} - -#accordion > dt.collapsed { - background-image : -webkit-gradient(linear, center top, center bottom, from(#aaaaaa), to(#ffffff)); -} - -#accordion > dt + dd { - background : #ffffff; - display : block; -} - -#accordion dd { - overflow : none; -} - -#accordion > dt.collapsed + dd { - max-height : 0%; - opacity : 0; - -webkit-transform : scaleY(0); - -webkit-transition : all 0.5s ease-in-out; -} - -#accordion > dt.expanded + dd { - max-height : 50%; - opacity : 1; - -webkit-transform : scaleY(1); - -webkit-transition : all 0.5s ease-in-out; -} - -#accordion > dd { - margin : 0; - padding : 0; -} - -#accordion > dd > ul > li { - padding-top : 0.25em; - padding-bottom : 0.5em; - padding-left : 1.0em; - padding-right : 1.0em; -} - -#accordion> dt.collapsed:last-of-type { - border-bottom : thin solid #aaaaaa; -} - diff --git a/examples/webkit/webkit-guide/css/anim_demo-rotate.css b/examples/webkit/webkit-guide/css/anim_demo-rotate.css deleted file mode 100644 index e03c9a86ce..0000000000 --- a/examples/webkit/webkit-guide/css/anim_demo-rotate.css +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -body { - background : #aaaaaa; - font-weight : bold; -} - -section { - color : #ffffff; - background : #777777; - font-size : x-large; - -webkit-transform : translate(-150%) scale(1); - position : absolute; - text-align : center; - padding : 1em; - top : 3em; - left : 3em; - bottom : 3em; - right : 3em; -} - -@-webkit-keyframes demoRotate { - 0% { -webkit-transform : translate(-150%); } - 10% { -webkit-transform : rotate(0deg) translate(0); } - 50% { -webkit-transform : rotate(180deg) translate(0); } - 90% { -webkit-transform : rotate(360deg) translate(0); } - 100% { -webkit-transform : translate(150%); } -} - -@-webkit-keyframes demoRotateOrigin { - 0% { -webkit-transform : rotate(0deg) translate(-150%); } - 10% { -webkit-transform : rotate(0deg) translate(0); } - 50% { -webkit-transform : rotate(-180deg) translate(0); } - 90% { -webkit-transform : rotate(-360deg) translate(0); } - 100% { -webkit-transform : rotate(-360deg) translate(150%) } -} - -@-webkit-keyframes end { - 0% { -webkit-transform : translate(150%); } - 30% { -webkit-transform : translate(0); } - 70% { -webkit-transform : translate(0); } - 100% { -webkit-transform : translate(150%); } -} - -.rotate { - -webkit-animation : demoRotate 9s 2s; - -webkit-transform-origin : center; - -webkit-animation-timing-function : linear; -} -.rotateOrigin { - -webkit-animation : demoRotateOrigin 9s 12s; - -webkit-transform-origin : top left; - -webkit-animation-timing-function : linear; -} -.end { - -webkit-animation : end 3s 22s; -} - diff --git a/examples/webkit/webkit-guide/css/anim_demo-scale.css b/examples/webkit/webkit-guide/css/anim_demo-scale.css deleted file mode 100644 index c9b69c4a9c..0000000000 --- a/examples/webkit/webkit-guide/css/anim_demo-scale.css +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-weight : bold; -} - -section { - color : #ffffff; - background : #777777; - font-size : x-large; - -webkit-transform : translate(-150%) scale(1); - position : absolute; - text-align : center; - padding : 1em; - top : 3em; - left : 3em; - bottom : 3em; - right : 3em; -} - -@-webkit-keyframes demoScale { - 0% { -webkit-transform : translate(-150%) scale(1); } - 10% { -webkit-transform : scale(1.0) translate(0); } - 30% { -webkit-transform : scale(0.5) translate(0); } - 50% { -webkit-transform : scale(1.0) translate(0); } - 70% { -webkit-transform : scale(1.5) translate(0); } - 90% { -webkit-transform : scale(1.0) translate(0); } - 100% { -webkit-transform : translate(150%) scale(1); } -} - -@-webkit-keyframes demoScaleX { - 0% { -webkit-transform : translate(-150%) scale(1); } - 10% { -webkit-transform : scaleX(1.0) translate(0); } - 30% { -webkit-transform : scaleX(0.5) translate(0); } - 50% { -webkit-transform : scaleX(1.0) translate(0); } - 70% { -webkit-transform : scaleX(1.5) translate(0); } - 90% { -webkit-transform : scaleX(1.0) translate(0); } - 100% { -webkit-transform : translate(150%) scale(1); } -} - -@-webkit-keyframes demoScaleY { - 0% { -webkit-transform : translate(-150%) scale(1); } - 10% { -webkit-transform : scaleY(1.0) translate(0); } - 30% { -webkit-transform : scaleY(0.5) translate(0); } - 50% { -webkit-transform : scaleY(1.0) translate(0); } - 70% { -webkit-transform : scaleY(1.5) translate(0); } - 90% { -webkit-transform : scaleY(1.0) translate(0); } - 100% { -webkit-transform : translate(150%) scale(1); } -} - -@-webkit-keyframes end { - 0% { -webkit-transform : translate(150%); } - 30% { -webkit-transform : translate(0); } - 70% { -webkit-transform : translate(0); } - 100% { -webkit-transform : translate(150%); } -} - -.scale { - -webkit-animation : demoScale 9s 2s; - -webkit-transform-origin : bottom; -} -.scaleX { - -webkit-animation : demoScaleX 9s 12s; - -webkit-transform-origin : left; -} -.scaleY { - -webkit-animation : demoScaleY 9s 22s; - -webkit-transform-origin : center; -} -.end { - -webkit-animation : end 3s 32s; -} - diff --git a/examples/webkit/webkit-guide/css/anim_demo-skew.css b/examples/webkit/webkit-guide/css/anim_demo-skew.css deleted file mode 100644 index abb1eaecfb..0000000000 --- a/examples/webkit/webkit-guide/css/anim_demo-skew.css +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-weight : bold; -} - -section { - color : #ffffff; - background : #777777; - font-size : x-large; - -webkit-transform : translate(-150%) scale(1); - position : absolute; - text-align : center; - padding : 1em; - top : 3em; - left : 3em; - bottom : 3em; - right : 3em; -} - -@-webkit-keyframes demoSkew { - 0% { -webkit-transform : translate(-150%); } - 10% { -webkit-transform : skew(0deg) translate(0); } - 30% { -webkit-transform : skew(30deg) translate(0); } - 50% { -webkit-transform : skew(0deg) translate(0); } - 70% { -webkit-transform : skew(-30deg) translate(0); } - 90% { -webkit-transform : skew(0deg) translate(0); } - 100% { -webkit-transform : translate(150%); } -} - -@-webkit-keyframes demoSkewY { - 0% { -webkit-transform : translate(-150%); } - 10% { -webkit-transform : skewY(0deg) translate(0); } - 30% { -webkit-transform : skewY(30deg) translate(0); } - 50% { -webkit-transform : skewY(0deg) translate(0); } - 70% { -webkit-transform : skewY(-30deg) translate(0); } - 90% { -webkit-transform : skewY(0deg) translate(0); } - 100% { -webkit-transform : translate(150%); } -} - -@-webkit-keyframes end { - 0% { -webkit-transform : translate(150%); } - 30% { -webkit-transform : translate(0); } - 70% { -webkit-transform : translate(0); } - 100% { -webkit-transform : translate(150%); } -} - -.skew { - -webkit-animation : demoSkew 9s 2s; - -webkit-transform-origin : bottom; -} -.skewY { - -webkit-animation : demoSkewY 9s 12s; - -webkit-transform-origin : left; -} -.end { - -webkit-animation : end 3s 22s; -} - diff --git a/examples/webkit/webkit-guide/css/anim_gallery.css b/examples/webkit/webkit-guide/css/anim_gallery.css deleted file mode 100644 index 2e87de2b3c..0000000000 --- a/examples/webkit/webkit-guide/css/anim_gallery.css +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; - background : #444444; -} -.gallery > div > div { - border-radius : 1.0em; - padding : 1em; - background : #dddddd; - min-height : 75%; -} -.gallery > div { - -webkit-transition : all 0.5s ease-in-out; - z-index : 0; - position : absolute; - top : 2.0em; - bottom : 2.0em; - left : 2.0em; - right : 2.0em; -} -.gallery > div.selected { - -webkit-transform : translate(0) scale(1); - opacity : 1.0; - z-index : 1; -} -.gallery > div.queueR { - -webkit-transform : translate(70%) scale(0.5); - opacity : 0.75; -} -.gallery > div.queueL { - -webkit-transform : translate(-70%) scale(0.5); - opacity : 0.75; -} -.gallery > div.hideR { - -webkit-transform : translate(200%) scale(0.5); - opacity : 0.0; -} -.gallery > div.hideL { - -webkit-transform : translate(-200%) scale(0.5); - opacity : 0.0; -} -.gallery img { - max-width : 100%; - max-height : 100%; - border-radius : 1.0em; -} - -.gallery > #reveal > div, .gallery > div > img { - -webkit-transform : scaleX(1) scaleY(1); - -webkit-transition : -webkit-transform 0.25s ease-out 0.25s; -} -.gallery > div > div, .gallery > #reveal > img { - -webkit-transform : scaleX(0) scaleY(1); - -webkit-transition : -webkit-transform 0.25s ease-out; -} - -section > div { - text-align : center; -} - -section > div > img { - display : inline-block; -} - -section > div > div { - position : absolute; - top : 0; - left : 1.5em; - right : 1.5em; -} - diff --git a/examples/webkit/webkit-guide/css/anim_panel.css b/examples/webkit/webkit-guide/css/anim_panel.css deleted file mode 100644 index 4c4282ba54..0000000000 --- a/examples/webkit/webkit-guide/css/anim_panel.css +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -section { - background : #aaaaaa; - position : absolute; - left : 1em; - right : 1em; - top : 1em; - bottom : 1em; -} - -.force { - padding-right : 5in; -} - -#panel { - text-align : justify; - padding : 0.5em; - border-radius : 0.5em; - background : #ffffff; - max-height : 2.0em; - float : right; - overflow : hidden; -} - -nav.expanded { - max-width : 95%; - -webkit-transition : max-width 0.5s ease-in-out; -} - -nav.collapsed { - max-width : 12%; - -webkit-transition : max-width 0.5s ease-in-out; - -} - -nav.expanded > .button { - display : none; -} - -nav.collapsed > .button { - display : inline-block; -} - -nav.expanded > .option { - opacity : 1; - -webkit-transform : scale(1); - -webkit-transition : all 0.5s linear; -} -nav.collapsed > .option { - opacity : 0; - -webkit-transform : scale(0); - -webkit-transition : all 0.5s linear; -} - -#dbg { - padding : 1em; - border-radius : 1em; - position : absolute; - top : 75%; - bottom : 1em; - left : 1em; - right : 1em; - background : #ffffff; -} - -.measure { - position : absolute; - top : 0; - left : 0; - width : 320px; - background : green; -} diff --git a/examples/webkit/webkit-guide/css/anim_pulse.css b/examples/webkit/webkit-guide/css/anim_pulse.css deleted file mode 100644 index 0cd2eae5b9..0000000000 --- a/examples/webkit/webkit-guide/css/anim_pulse.css +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - -.force { - padding-left : 100% -} - -nav { - text-align : justify; -} - -nav > a { - background-size : contain; - background-repeat : no-repeat; -} - -nav > a { - display : inline-block; - width : 2em; - height : 2em; -} - -nav > a:nth-of-type(1) { background-image : url(../img/ic_fe_032.png); } -nav > a:nth-of-type(2) { background-image : url(../img/ic_ni_032.png); } -nav > a:nth-of-type(3) { background-image : url(../img/ic_he_032.png); } -nav > a:nth-of-type(4) { background-image : url(../img/ic_na_032.png); } -nav > a:nth-of-type(5) { background-image : url(../img/ic_zn_032.png); } -nav > a:nth-of-type(6) { background-image : url(../img/ic_o_032.png); } - -h1,h2,h3 { margin-top : 0; } - -nav > a:target { -webkit-animation : pulse 1s infinite; } - -@-webkit-keyframes pulse { - 0% { opacity : 1.0 } - 50% { opacity : 0.7 } -} - diff --git a/examples/webkit/webkit-guide/css/anim_skew.css b/examples/webkit/webkit-guide/css/anim_skew.css deleted file mode 100644 index 99d48a2a89..0000000000 --- a/examples/webkit/webkit-guide/css/anim_skew.css +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - padding : 1em; - font-family : "Helvetica"; - font-weight : bold; -} - -span { - background : #ffffff; - font-weight : bold; - cursor : pointer; -} - -.items > div { - cursor : pointer; - background : #ffffff; - height : 2em; - padding : 0.5em 0.5em 0.0em 0.5em; - border-radius : 0.25em; - position : absolute; - left : 1em; - right : 1em; - -webkit-transition-property : -webkit-transform, top; - -webkit-transition-duration : 0.5s, 0.5s; - -webkit-transition-delay : 0s, 0.5s; - -webkit-transition-timing-function : ease-in-out; -} - -.hide { - -webkit-transform-origin : bottom left; - -webkit-transform : skew(40deg) translate(140%,0em); -} - -.items > div:after { - content : url(../img/icon_dismiss_x22.png); - float : right; -} - -.row1 { - top : 3.5em; -} -.row2 { - top : 6.5em; -} -.row3 { - top : 9.5em; -} -.row4 { - top : 12.5em; -} -.row5 { - top : 15.5em; -} -.row6 { - top : 18.5em; -} -.row7 { - top : 21.5em; -} -.row8 { - top : 24.5em; -} -.row9 { - top : 27.5em; -} -.row10 { - top : 30.5em; -} -.row11 { - top : 33.5em; -} -.row12 { - top : 36.5em; -} -.row13 { - top : 39.5em; -} -.row14 { - top : 42.5em; -} -.row15 { - top : 45.5em; -} - -.items > div { - padding-left : 3.0em; - color : #444444; - background-size : contain; - background-repeat : no-repeat; -} - -.items > div[title='cat1'] { - background-image : url(../img/ic_fe_036.png); -} - -.items > div[title='cat2'] { - background-image : url(../img/ic_na_036.png); -} - -.items > div[title='cat3'] { - background-image : url(../img/ic_ni_036.png); -} - -.items > div[title='cat4'] { - background-image : url(../img/ic_mg_036.png); -} - -nav { - position : absolute; - background : #aaaaaa; - top : 0; - left : 0; - right : 0; - z-index : 10; - height : 2em; - text-align : center; - padding : 0.5em; -} - -nav > div { - background-size : contain; - background-repeat : no-repeat; - display : inline-block; - width : 36px; - height : 36px; - margin-left : 0.25em; - margin-right : 0.25em; - background-image : -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#eeeeee)); -} - -nav > div { - background-image : url(../img/icon_list-all.png); -} -nav > .cat1 { - background-image : url(../img/ic_fe_036.png); -} -nav > .cat2 { - background-image : url(../img/ic_na_036.png); -} -nav > .cat3 { - background-image : url(../img/ic_ni_036.png); -} -nav > .cat4 { - background-image : url(../img/ic_mg_036.png); -} - diff --git a/examples/webkit/webkit-guide/css/anim_slide.css b/examples/webkit/webkit-guide/css/anim_slide.css deleted file mode 100644 index cd715efaf3..0000000000 --- a/examples/webkit/webkit-guide/css/anim_slide.css +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* main layout */ -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -h1 { - min-height : 1.5em; - background : #ffffff; - margin-left : 1em; - margin-right : 1em; - text-align : center; - font-size : 18px; - padding-top : 0.25em; - padding-bottom : 0.25em; - border-radius : 0.5em; -} - -.panel { - position : absolute; - top : 0em; - bottom : 0em; - left : 0em; - right : 0em; -} - -article { - background : #ffffff; - padding : 1em; - border-radius : 1em; - margin : 1em; -} - -.panel > ul { - padding : 0em; - list-style-type : none; -} -.panel > ul > li { - background : #fff; - margin : 0.5em 1.0em 0.5em 1.0em; - padding : 0.5em; - display : block; - border-radius : 0.5em; -} -.panel > ul > li > a { - width : 100%; - display : block; - text-decoration : none; - text-align : justify; - color : #000000; -} -.panel > a { - background : #fff; - margin : 0 1.0em 1.0em 0em; - padding : 0.5em; -} -/* navigational hints */ - -a.go_out { - background : transparent; - position : absolute; - top : 0.5em; - left : 1.2em; - content : url(../img/icon_drill-up_x32.png); - padding : 0.25em; - border-radius : 1em; - display : block; -} - -.panel > ul > li > a:after { - text-align : right; - float : right; - font-size : 1em; - font-weight : bold; -} -.panel > ul > li > a:after { - -webkit-transform : translate(0, -0.5em); - content : url(../img/icon_drill-down_x32.png); -} - -/* animations */ -#in:target { - -webkit-animation : slide_in 0.25s; -} -#out:target + .panel { - -webkit-animation : slide_out 0.25s; -} -@-webkit-keyframes slide_in { - from { - left : 80%; - right : -80%; - } - to { - left : 0em; - right : 0em; - } -} -@-webkit-keyframes slide_out { - from { - left : -80%; - right : 80%; - } - to { - left : 0em; - right : 0em; - } -} diff --git a/examples/webkit/webkit-guide/css/anim_tabbedSkew.css b/examples/webkit/webkit-guide/css/anim_tabbedSkew.css deleted file mode 100644 index 16bbd7983e..0000000000 --- a/examples/webkit/webkit-guide/css/anim_tabbedSkew.css +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -section { - background : #ffffff; - position : absolute; - left : 1em; - right : 1em; - top : 1em; - min-height : 60%; - padding : 1.0em; - border-radius : 0.5em; -} - -nav { - text-align : right; - width : 3.5em; - height : 4em; - float : right; -} - -nav > a { - border-radius : 0.25em; - width : 1em; - height : 1em; - text-align : center; - font-weight : bold; - font-size : 2em; - text-decoration : none; - color : black; - position : relative; - background-size : contain; - display : block; -} - -nav > a:nth-of-type(1) { - margin-bottom : 0.1em; - background-image : url(../img/ic_he_032.png); - -webkit-transform : skew(-30deg); -} - -nav > a:nth-of-type(2) { - background-image : url(../img/ic_o_032.png); - -webkit-transform : skew(30deg); -} - -nav > a:nth-of-type(3) { - background-image : url(../img/ic_na_032.png); - -webkit-transform : rotate(-60deg) skew(-30deg) translate(1.7em, -1px); -} - -article { - display : none; - margin-bottom : 4em; -} - -article:target { - display : block; -} - -h3 + div { - display : inline-block; - float : right; - width : 12px; - height : 3em; -} - -h1,h2,h3,h4 { - margin-top : 0.5em; -} - diff --git a/examples/webkit/webkit-guide/css/css3_backgrounds.css b/examples/webkit/webkit-guide/css/css3_backgrounds.css deleted file mode 100644 index a466603046..0000000000 --- a/examples/webkit/webkit-guide/css/css3_backgrounds.css +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; - background : #aaaaaa; -} - -h1,h2,h3,h4 { - background : #ffffff; - text-align : center; - margin : 0.5em; - padding : 0.5em; - border-radius : 0.5em; -} - -.accordion { - margin : 0.5em 0.5em 6em 0.5em; - border-radius : 0.5em; - border : thin solid #aaa; - background : #ffffff; - overflow : hidden; - padding : 1.0em 0.5em 1.0em 0.5em; - -} - -.accordion > dt { - cursor : pointer; - border-top : thin solid #aaa; - border-radius : 0.5em; - padding : 0.5em 0.5em 0.5em 2.5em; - font-weight : bold; - background-size : auto; - background-image : url(../img/icon_head-collapsed_x13.png); - background-repeat : no-repeat; - background-position : 12px 12px; -} - -.accordion > dt:first-of-type { - border-top : none; -} - -.accordion > dt.selected { - background-image : url(../img/icon_head-expanded_x13.png) , url(../img/gradient.jpg); - background-repeat : no-repeat , repeat-x; - background-position : 12px 12px , 0 0; - margin-bottom : 0em; -} - -dt + dd { - max-height : 0%; - margin : 0; - opacity : 0; - padding : 0.5em; - overflow-y : hidden; - max-height : 0; - -webkit-transform : scaleY(0); - -webkit-transition : all 0.5s linear; -} - -dt.selected + dd { - -webkit-transform : scaleY(1); - -webkit-transform-origin : center; - max-height : 1000px; - -webkit-transition : all 0.5s linear; - opacity : 1; -} - diff --git a/examples/webkit/webkit-guide/css/css3_border-img.css b/examples/webkit/webkit-guide/css/css3_border-img.css deleted file mode 100644 index 878741f255..0000000000 --- a/examples/webkit/webkit-guide/css/css3_border-img.css +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - -.fruit { - padding : 2.5em; - -webkit-border-image : url(../img/border-frame.png) 2 stretch stretch; -} - diff --git a/examples/webkit/webkit-guide/css/css3_grad-radial.css b/examples/webkit/webkit-guide/css/css3_grad-radial.css deleted file mode 100644 index 1b2ecaf1d9..0000000000 --- a/examples/webkit/webkit-guide/css/css3_grad-radial.css +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 70%; -} - diff --git a/examples/webkit/webkit-guide/css/css3_gradientBack.css b/examples/webkit/webkit-guide/css/css3_gradientBack.css deleted file mode 100644 index 63c7843926..0000000000 --- a/examples/webkit/webkit-guide/css/css3_gradientBack.css +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; -} - -section { - position : absolute; - top : 0.0em; - left : 0.0em; - right : 0.0em; - background : #aaaaaa; - background : -webkit-gradient(linear, center top, center bottom, from(#dddddd), to(#777777) ); - padding : 1em; -} - -article { - background : #ffffff; - padding : 1em; - border-radius : 0.5em; - border : thin #aaaaaa solid; - margin-bottom : 12em; -} - -h1, h2, h3, h4 { - text-align : center; - margin-top : 0.5em; -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - diff --git a/examples/webkit/webkit-guide/css/css3_gradientBackStop.css b/examples/webkit/webkit-guide/css/css3_gradientBackStop.css deleted file mode 100644 index c3c89af542..0000000000 --- a/examples/webkit/webkit-guide/css/css3_gradientBackStop.css +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; -} - -section { - position : absolute; - top : 0.0em; - left : 0.0em; - right : 0.0em; - background : #aaaaaa; - background : -webkit-gradient(linear, center top, center bottom, from(#777777), color-stop(50%,#dddddd), to(#777777) ); - padding : 1em; -} - -article { - background : #ffffff; - padding : 1em; - border-radius : 0.5em; - border : thin #aaaaaa solid; - margin-bottom : 12em; -} - -h1, h2, h3, h4 { - text-align : center; - margin-top : 0.5em; -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - diff --git a/examples/webkit/webkit-guide/css/css3_gradientButton.css b/examples/webkit/webkit-guide/css/css3_gradientButton.css deleted file mode 100644 index 05f3395114..0000000000 --- a/examples/webkit/webkit-guide/css/css3_gradientButton.css +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #ffffff; -} - -article { - background : #ffffff; - position : absolute; - margin : 0; - left : 0; - right : 0; - top : 0; - bottom : 0; -} - -ul { - font-weight : bold; - padding : 0; - list-style : none; - margin : 0.5em 0.5em 6em 0.5em; -} - -ul > li { - margin-bottom : 0.5em; -} - -ul > li > a { - padding : 0.5em; - display : block; - text-decoration : none; - color : #000000; - border : thin #aaaaaa solid; - border-radius : 0.5em; - background : #dddddd; - background : -webkit-gradient(linear, center top, center bottom, - from(#cccccc), to(#ffffff) ); -} - -ul > li > a:active { - color : #ffffff; - background : #ffffff; - background : -webkit-gradient(linear, center top, center bottom, - from(#dddddd), to(#444444) ); -} - -h1,h2,h3,h4 { - text-align : center; -} - diff --git a/examples/webkit/webkit-guide/css/css3_mask-grad.css b/examples/webkit/webkit-guide/css/css3_mask-grad.css deleted file mode 100644 index f77d7f1164..0000000000 --- a/examples/webkit/webkit-guide/css/css3_mask-grad.css +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; - background : #ffffff; -} - -h1,h2,h3,h4 { - text-align : center; -} - -img { - -webkit-mask-box-image : -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))); - border-radius : 0.25em; - margin : 0.1em; -} - -img.select { - -webkit-mask-box-image : none; - -webkit-box-shadow : 0.2em 0.2em 0.4em #aaaaaa; -} - diff --git a/examples/webkit/webkit-guide/css/css3_mask-img.css b/examples/webkit/webkit-guide/css/css3_mask-img.css deleted file mode 100644 index 58e97fa4ef..0000000000 --- a/examples/webkit/webkit-guide/css/css3_mask-img.css +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; - background : #333333; -} - -h1,h2,h3,h4 { - text-align : center; -} - -img { - position : absolute; - left : 5%; - top : 5%; - height : 90%; - width : 90%; - -webkit-mask-box-image : url(../img/mask.png) 5% stretch; -} - diff --git a/examples/webkit/webkit-guide/css/css3_multicol.css b/examples/webkit/webkit-guide/css/css3_multicol.css deleted file mode 100644 index 75cfc8d639..0000000000 --- a/examples/webkit/webkit-guide/css/css3_multicol.css +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - font-family : sans-serif; - background : #aaaaaa; -} - -section { - bottom : 0; - left : 0; - top : 12%; - right : 0; - position : absolute; - padding-bottom : 6em; -} - -article { - border-radius : 1em; - margin : 1em; - padding : 1em; - background : #ffffff; -} - -h1,h2,h3,h4 { - text-align : center; - margin-top : 0.0em; -} - -nav.ad { - width : 500%; - border : thin #aaaaaa solid; - background : #dddddd; - position : absolute; - top : 0%; - height : 10%; - column-count : 5; - column-width : 100%; - -webkit-animation : banner_scroll 30s infinite; -} - -nav.ad > a { - width : 20%; - height : 100%; - display : inline-block; - text-align : center; - padding-top : 0.5em; - text-decoration : none; - font-weight : bold; - color : #000000; - font-size : larger; -} - -nav.ad > a:nth-of-type(5n-0) { background : lightgreen; } -nav.ad > a:nth-of-type(5n-1) { background : pink; } -nav.ad > a:nth-of-type(5n-2) { background : plum; } -nav.ad > a:nth-of-type(5n-3) { background : lightblue; } -nav.ad > a:nth-of-type(5n-4) { background : lightcoral; } - -@-webkit-keyframes banner_scroll { - 0% { left : 0%; } - 18% { left : 0%; } - 20% { left : -100%; } - 38% { left : -100%; } - 40% { left : -200%; } - 58% { left : -200%; } - 60% { left : -300%; } - 78% { left : -300%; } - 80% { left : -400%; } - 95% { left : -400%; } - 100% { left : 0%; } -} - diff --git a/examples/webkit/webkit-guide/css/css3_reflect.css b/examples/webkit/webkit-guide/css/css3_reflect.css deleted file mode 100644 index 2847c0712b..0000000000 --- a/examples/webkit/webkit-guide/css/css3_reflect.css +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -body > section { - border-radius : 1em; - padding : 1em; - background : #ffffff; - margin-bottom : 10em; - min-height : 70%; -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - -.nav > a { - display : inline-block; - width : 48px; - height : 48px; -} - -body > section.main { - position : absolute; - left : 0em; - right : 0em; - top : 0em; - min-height : 50%; - border-radius : 0.5em; - background : #aaaaaa; - padding : 0; -} - -section.main > article { - background : #ffffff; - padding : 1em; - margin : 1em 1em 10em 1em; - border-radius : 0.5em; -} - -h1, h2, h3 { - color : #206ead; - margin-top : 0em; - text-align : center; - margin-bottom : 1em; - -webkit-box-reflect : below -0.25em -webkit-gradient(linear, center top, center bottom, from(transparent), color-stop(0.25, transparent), to(black)); -} - -.nav1 { background-image : url(../img/ic_he_032.png) } -.nav2 { background-image : url(../img/ic_o_032.png) } -.nav3 { background-image : url(../img/ic_ni_032.png) } -.nav4 { background-image : url(../img/ic_fe_032.png) } -.nav5 { background-image : url(../img/ic_na_032.png) } -.nav6 { background-image : url(../img/ic_zn_032.png) } - -h1 { font-size : 1.5em; } -h2 { font-size : 1.2em; } -h3 { font-size : 1.0em; } - -figure { - display : block; - text-align : center; -} - -figure > img { - width : 70%; - margin-bottom : 3em; - -webkit-box-reflect : below 0.25em -webkit-gradient(linear, center top, center bottom, from(transparent), color-stop(0.50, transparent), to(black)); -} - -p:first-line { - font-weight : bold; -} - -p:first-letter { - font-size : 200%; - float : left; - padding-right : 0.1em; -} - diff --git a/examples/webkit/webkit-guide/css/css3_scroll.css b/examples/webkit/webkit-guide/css/css3_scroll.css deleted file mode 100644 index af4b177d89..0000000000 --- a/examples/webkit/webkit-guide/css/css3_scroll.css +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background-color : #aaaaaa; - font-family : sans-serif; -} - -h1,h2,h3,h4 { - margin-top : 0.5em; - font-size : 18px; - text-align : center; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1.0em 0.5em 6.0em 0.5em; - min-height : 50%; -} - -pre { - font-weight : bold; - font-family : monospace; - padding : 1.0em 3em 1.0em 1.0em; - border : thin solid #aaaaaa; - border-radius : 1.5em; - overflow-x : auto; - background-image : -webkit-gradient(linear,left center,right center,from(#ffffff),to(#777777)); -} - -pre::-webkit-scrollbar { - height : 3em; -} - -pre::-webkit-scrollbar-button:increment { - background-image : url(../img/icon_scroll-right.png); -x background-size : contain; - background-repeat : no-repeat; - width : 3em; - height : 3em; -} - -pre::-webkit-scrollbar-button:decrement { - background-image : url(../img/icon_scroll-left.png); - background-size : contain; - background-repeat : no-repeat; - width : 3em; - height : 3em; -} - -pre::-webkit-scrollbar-track { - display : none; -} - diff --git a/examples/webkit/webkit-guide/css/css3_sel-nth.css b/examples/webkit/webkit-guide/css/css3_sel-nth.css deleted file mode 100644 index dd4ff26901..0000000000 --- a/examples/webkit/webkit-guide/css/css3_sel-nth.css +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -img { - position : absolute; - width : 48px; - height : 48px; - padding : 0.25em; - border : #ffffff medium solid; - border-radius : 0.5em; -} - -/* columns */ -img:nth-of-type(4n-3) { left : 2% } -img:nth-of-type(4n-2) { left : 27% } -img:nth-of-type(4n-1) { left : 52% } -img:nth-of-type(4n-0) { left : 77% } - -/* rows */ -img:nth-of-type(n) { top : 5% } -img:nth-of-type(n+5) { top : 20% } -img:nth-of-type(n+9) { top : 35% } -img:nth-of-type(n+13) { top : 50% } -img:nth-of-type(n+17) { top : 65% } -img:nth-of-type(n+21) { top : 80% } - diff --git a/examples/webkit/webkit-guide/css/css3_shadow.css b/examples/webkit/webkit-guide/css/css3_shadow.css deleted file mode 100644 index 3086ace680..0000000000 --- a/examples/webkit/webkit-guide/css/css3_shadow.css +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -body > section { - border-radius : 1em; - padding : 1em; - background : #ffffff; - margin-bottom : 10em; - min-height : 70%; -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - -.nav > a { - display : inline-block; - width : 48px; - height : 48px; -} - -nav > a:active { - -webkit-transform : scale(0.8); -} - -h1, h2 { - margin-top : 0em; - font-size : 18px; - text-align : center; -} - -h2 { - border-top : solid thin #aaaaaa; -} - -body > section.main { - position : absolute; - left : 0em; - right : 0em; - top : 5em; - min-height : 50%; - border-radius : 0.5em; - background : #aaaaaa; - padding : 0; -} - -section.main > article { - background : #ffffff; - padding : 1em; - margin : 1em 1em 10em 1em; - border-radius : 0.5em; -} - -section.nav { - z-index : 10; - border-radius : 0; - background : #aaaaaa; - background : transparent; - position : absolute;; - padding : 1em; - top : 0; - right : 0.0em; - left : 0.0em; -} - -nav { - padding : 0.5em; - border-radius : 0.5em; - background : #ffffff; - top : 10px; - text-align : justify; - height : 36px; - overflow : hidden; -} - -nav > a { - display : inline-block; - background-repeat : no-repeat; - height : 36px; - width : 36px; -} - -#force_justify { - padding-left : 100%; -} - -.nav1 { background-image : url(../img/ic_he_032.png) } -.nav2 { background-image : url(../img/ic_o_032.png) } -.nav3 { background-image : url(../img/ic_ni_032.png) } -.nav4 { background-image : url(../img/ic_fe_032.png) } -.nav5 { background-image : url(../img/ic_na_032.png) } -.nav6 { background-image : url(../img/ic_zn_032.png) } - -nav { - -webkit-box-shadow : 0.5em 0.5em #777777; -} - diff --git a/examples/webkit/webkit-guide/css/css3_shadowBlur.css b/examples/webkit/webkit-guide/css/css3_shadowBlur.css deleted file mode 100644 index e65fcd5692..0000000000 --- a/examples/webkit/webkit-guide/css/css3_shadowBlur.css +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -body > section { - border-radius : 1em; - padding : 1em; - background : #ffffff; - margin-bottom : 10em; - min-height : 70%; -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - -.nav > a { - display : inline-block; - width : 48px; - height : 48px; -} - -h1, h2 { - margin-top : 0em; - font-size : 18px; - text-align : center; -} - -h2 { - border-top : solid thin #aaaaaa; -} - -body > section.main { - position : absolute; - left : 0em; - right : 0em; - top : 5em; - min-height : 50%; - border-radius : 0.5em; - background : #aaaaaa; - padding : 0; -} - -section.main > article { - background : #ffffff; - padding : 1em; - margin : 1em 1em 10em 1em; - border-radius : 0.5em; -} - -section.nav { - z-index : 10; - border-radius : 0; - background : #aaaaaa; - background : transparent; - position : absolute;; - padding : 1em; - top : 0; - right : 0.0em; - left : 0.0em; -} - -nav { - padding : 0.5em; - border-radius : 0.5em; - background : #ffffff; - top : 10px; - text-align : justify; - height : 36px; - overflow : hidden; -} - -nav > a { - display : inline-block; - background-repeat : no-repeat; - height : 36px; - width : 36px; -} - -nav > a:active { - -webkit-transform : scale(0.8); -} - -#force_justify { - padding-left : 100%; -} - -.nav1 { background-image : url(../img/ic_he_032.png) } -.nav2 { background-image : url(../img/ic_o_032.png) } -.nav3 { background-image : url(../img/ic_ni_032.png) } -.nav4 { background-image : url(../img/ic_fe_032.png) } -.nav5 { background-image : url(../img/ic_na_032.png) } -.nav6 { background-image : url(../img/ic_zn_032.png) } - -nav { - -webkit-box-shadow : 0.5em 0.5em 0.5em #444444; -} - diff --git a/examples/webkit/webkit-guide/css/css3_text-overflow.css b/examples/webkit/webkit-guide/css/css3_text-overflow.css deleted file mode 100644 index 3330a78d20..0000000000 --- a/examples/webkit/webkit-guide/css/css3_text-overflow.css +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - -.accordion { - border : #777777 solid thin; - padding : 0.0em; - border-radius : 0.5em; - list-style : none; -} - -.accordion > li { - padding : 0.5em; - border-bottom : #777777 solid thin; - white-space : nowrap; - max-height : 1.5em; - overflow : hidden; - text-overflow : clip; - text-overflow : ellipsis; - text-overflow : ellipsis-word; - -webkit-transition : max-height 1s ease-in-out; -} - -.accordion > li:last-of-type { - border-bottom : none; -} - -.accordion > li.selected { - -webkit-transition : max-height 1s ease-in-out; - max-height : 100em; - white-space : normal; - font-weight : normal; -} - -.accordion > li.selected:first-line { - font-weight : bold; -} - -.accordion > li.selected:first-letter { - font-size : 200%; - float : left; - padding-right : 0.1em; -} - -.dismiss { - content : url(../img/icon_dismiss.png); -} - -.accordion > li > .dismiss { - display : none; -} - -.accordion > li.selected > .dismiss { - display : block; - float : right; -} - diff --git a/examples/webkit/webkit-guide/css/css3_text-shadow.css b/examples/webkit/webkit-guide/css/css3_text-shadow.css deleted file mode 100644 index 31e58e8587..0000000000 --- a/examples/webkit/webkit-guide/css/css3_text-shadow.css +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -h1,h2,h3,h4 { - text-align : center; - text-shadow : 0.20em 0.20em 0.20em #999; - color : #206ead; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - diff --git a/examples/webkit/webkit-guide/css/css3_text-stroke.css b/examples/webkit/webkit-guide/css/css3_text-stroke.css deleted file mode 100644 index 996ce09db1..0000000000 --- a/examples/webkit/webkit-guide/css/css3_text-stroke.css +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -h1,h2,h3,h4 { - margin-top : 0.5em; - text-align : center; -} - -h1 { - -webkit-text-stroke : 2px #000000; - font-size : 40px; -} - -h1, h2, h3 { - color : #206ead; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - diff --git a/examples/webkit/webkit-guide/css/form_tapper.css b/examples/webkit/webkit-guide/css/form_tapper.css deleted file mode 100644 index 7b86ec443d..0000000000 --- a/examples/webkit/webkit-guide/css/form_tapper.css +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* MOBILE UI */ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -body > section { - border-radius : 1em; - padding : 1em; - background : #ffffff; - margin : 1em 1em 10em 1em; - min-height : 70% -} - -h1, h2 { - margin-top : 1em; - font-size : smaller; - text-align : center; - padding-top : 1em; -} - -h2 { - border-top : solid thin #dddddd; -} - -/* FORM */ - -form { - font-weight : bold; - font-size : small; -} - -input[type=radio], -input[type=checkbox] { - -webkit-appearance : button; - float : right; - margin-bottom : -2em; - opacity : 0; -} - -label, -input[type=radio], -input[type=checkbox] { - width : 90%; - display : block; - padding : 0.5em; - height : 2em; -} - -label { - padding-top : 0.5em; - border : medium solid #aaaaaa; - border-radius : 1.0em; -} - -input[type=radio]:checked + label, -input[type=checkbox]:checked + label { - border : medium solid green; -} - -input[type=radio]:checked + label:after, -input[type=checkbox]:checked + label:after { - float : right; - padding-right : 0.5em; - content : url(../img/icon_check_x24green.png); -} - diff --git a/examples/webkit/webkit-guide/css/form_toggler.css b/examples/webkit/webkit-guide/css/form_toggler.css deleted file mode 100644 index fc5d888a4d..0000000000 --- a/examples/webkit/webkit-guide/css/form_toggler.css +++ /dev/null @@ -1,200 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* MOBILE UI */ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -body > section { - border-radius : 1em; - padding : 1em; - background : #ffffff; - margin : 1em 1em 10em 1em; - min-height : 70% -} - -h1, h2 { - margin-top : 1em; - font-size : smaller; - text-align : center; - padding-top : 1em; -} - -h2 { - border-top : solid thin #dddddd; -} - - /* FORM */ - -form -{ - line-height : 250%; - font-weight : bold; - font-size : small; -} - - /* DEFAULT INPUT */ - -input[type=radio], -input[type=checkbox] -{ - text-align : right; - padding-top : 0.1em; - text-transform : uppercase; - float : right; - -webkit-appearance : button; - border : 0.25em #aaaaaa solid; - background : #aaaaaa; - background : -webkit-gradient(linear,center top,center bottom,from(#999999),to(#ffffff)); - border-radius : 0.5em; - min-width : 6em; - height : 2em; - display : inline-block; -} - - /* CHECKED INPUT */ - -input[type=radio]:checked, -input[type=checkbox]:checked -{ - text-align : left; -} - - /* FLIPPED INPUT */ - -input.invert -{ - text-align : left; -} - -input.invert:checked -{ - text-align : right; -} - - /* DEFAULT TEXT */ - -input[type=radio]:before, -input[type=checkbox]:before -{ - color : #888888; - height : 1.4em; - display : inline-block; - background : pink; - background : -webkit-gradient(linear,center top,center bottom,from(pink),to(#ffffff)); - min-width : 50%; - content : "off"; - text-align : center; - font-weight : bold; - padding-left : 0.5em; - padding-right : 0.5em; - border-radius : 0.25em; -} - - /* CHECKED TEXT */ - -input[type=radio]:checked:before, -input[type=checkbox]:checked:before -{ - color : #ffffff; - content : "on"; - background : #00aa00; - background : -webkit-gradient(linear,center top,center bottom,from(green),to(cyan)); -} - - /* ALTERNATE DISPLAY */ - -input.yn:before -{ - content : "no"; -} - -input.yn:checked:before -{ - content : "yes"; -} - -input.tf:before -{ - content : "false"; -} - -input.tf:checked:before -{ - content : "true"; -} - - /* BINARY */ - -input.binary { - display : inline-block; -} - -input.binary:checked { - display : none; -} - -input.binary:before { - background : #00aa00; - background : -webkit-gradient(linear,center top,center bottom,from(green),to(cyan)); - color : #ffffff; -} - -input.binary:nth-of-type(odd) { - text-align : left; -} - -input.binary:nth-of-type(even) { - text-align : right; -} - - /* CUSTOM */ - -input.ampm:nth-of-type(odd):before { content : "am"; } -input.ampm:nth-of-type(even):before { content : "pm"; } - -input.sex:nth-of-type(odd):before { content : "male"; } -input.sex:nth-of-type(even):before { content : "female"; } - -input.sex { width : 8em } - diff --git a/examples/webkit/webkit-guide/css/layout_link-fmt.css b/examples/webkit/webkit-guide/css/layout_link-fmt.css deleted file mode 100644 index 918b694dca..0000000000 --- a/examples/webkit/webkit-guide/css/layout_link-fmt.css +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -p { - font-weight : normal; -} - -a { - text-wrap : suppress; - -webkit-text-wrap : suppress; -} - -article { - background : #ffffff; - position : absolute; - top : 1em; - left : 1em; - right : 1em; - padding : 1em; - border-radius : 1em; - margin-bottom : 2em; -} - -ol { - padding-left : 1em; -} - -ol.links { - margin-bottom : 1em; - border : #aaaaaa thin solid; - list-style : none; - padding-top : 0.5em; - padding-bottom : 0.5em; - padding-left : 0em; - border-radius : 1.0em; -} - -ol.links > li { - min-height : 2em; - border-bottom : #aaaaaa thin solid; - padding-left : 0.5em; - padding-right : 0.5em; - padding-top : 0.5em; -} - -ol.links > li:last-of-type { - border : none; -} - -p a[href]:after { - -webkit-transform : scale(0.6); - -webkit-transform-origin : bottom; - padding-left : 0.25em; - padding-right : 0.0em; - display : inline-block; -} - -a[href] { - text-decoration : none; -} - -ol.links > li > a { - display : block; -} - -ol.links a:after { - -webkit-transform : scale(0.8); - -webkit-transform-origin : top; -} - -a[href^="http://"]:after, a[href^="https://"]:after { - content : url(../img/icon_link-external.png); -} - -a[href^="mailto:"]:after { content : url(../img/icon_link-email.png); } - -a[href^="sms:"]:after { content : url(../img/icon_link-sms.png); } - -a[href^="tel:"]:after { content : url(../img/icon_link-tel.png); } - -a[href$=".doc"]:after { content : url(../img/icon_link-doc.png); } - -a[href$=".ppt"]:after { content : url(../img/icon_link-ppt.png); } - -a[href$=".rss"]:after, -a[href$=".xml"]:after { content : url(../img/icon_link-rss.png); } - -a[href$=".pdf"]:after { content : url(../img/icon_link-pdf.png); } - -a[href$=".xls"]:after { content : url(../img/icon_link-xls.png); } - -ol.links a:after { - float : right; -} diff --git a/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css b/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css deleted file mode 100644 index 66b9f03a49..0000000000 --- a/examples/webkit/webkit-guide/css/layout_tbl-keyhole.css +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; -} - -.mobile { - display : block; -} - -.mobile > thead > th, -.mobile > thead > tr { - display : none; -} - -.mobile > tbody > tr { - display : none; - background : #ffffff; - padding : 0.5em; - padding-top : 0.5em; - border-radius : 0.25em; -} - -.mobile > tbody > tr:target { - display : block; - border : medium solid #aaaaaa; -} - -.mobile > tbody > tr:nth-of-type(1) { - padding-top : 0.5em; -} - -.mobile td { - display : block; -} - -.mobile td:before { - font-style : italic; - font-weight : bold; -} - -.mobile td:nth-of-type(5n+1) { - font-weight : bold; - color : #206ead; -} - -.mobile td:nth-of-type(5n+2):before { - content : 'Price: '; -} -.mobile td:nth-of-type(5n+3):before { - content : 'Location: '; -} -.mobile td:nth-of-type(5n+4):before { - content : 'Posted: '; -} - -table th.nav { - display : none; -} - -.mobile tbody th.nav { - display : block; - width : 36px; - float : right; -} - -th.nav a { - display : inline-block; - width : 36px; - height : 36px; - background : #ffffff; - content : url(../img/icon_nav-up.png); - margin-bottom : 0.5em; -} - -th.nav a:nth-of-type(even) { - -webkit-transform : rotate(180deg); -} - -tr:first-of-type th.nav a:nth-of-type(odd), -tr:last-of-type th.nav a:nth-of-type(even) -{ - content : url(../img/icon_dismiss.png); -} - -tr th.nav a { - display : none; -} - -tr:first-of-type th.nav a, -tr:last-of-type th.nav a, -tr:target th.nav a { - display : block; -} - -article { - background : #ffffff; - border-radius : 0.5em; - margin : 0.5em; - padding : 0.5em; -} - -h1 { - margin-top : 0.5em; - text-align : center; - font-size : 18px; -} - diff --git a/examples/webkit/webkit-guide/css/mob_condjs.css b/examples/webkit/webkit-guide/css/mob_condjs.css deleted file mode 100644 index 401daa90bb..0000000000 --- a/examples/webkit/webkit-guide/css/mob_condjs.css +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#js { - background : pink; - padding : 0.5em; - border-radius : 0.5em; -} -#js, #design { - padding : 0.5em; - border-radius : 0.5em; -} -#js { - background : pink; -} -#design { - background : lightgreen; -} diff --git a/examples/webkit/webkit-guide/css/mob_mediaquery.css b/examples/webkit/webkit-guide/css/mob_mediaquery.css deleted file mode 100644 index 7979f30578..0000000000 --- a/examples/webkit/webkit-guide/css/mob_mediaquery.css +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#design { - padding : 0.5em; - border-radius : 0.5em; - background : lightgreen; -} - -#design { - background : lightgreen; -} diff --git a/examples/webkit/webkit-guide/css/mobile.css b/examples/webkit/webkit-guide/css/mobile.css deleted file mode 100644 index dd162f9633..0000000000 --- a/examples/webkit/webkit-guide/css/mobile.css +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - width : 100; -} - -body > section { - border-radius : 1em; - background : #ffffff; - border-radius : 1em; - padding : 1em; - background : #ffffff; - min-height : 70% -} - -.hidden { - display : none; -} - -.active { - color : blue; - cursor : pointer; - text-decoration : none; -} - -.nav > a { - display : inline-block; - width : 48px; - height : 48px; -} - -h1, h2 { - margin-top : 1em; - font-size : smaller; - text-align : center; - padding-top : 1em; -} - -h2 { - border-top : solid thin #dddddd; -} - diff --git a/examples/webkit/webkit-guide/css/mq_desktop.css b/examples/webkit/webkit-guide/css/mq_desktop.css deleted file mode 100644 index 4438d74ccb..0000000000 --- a/examples/webkit/webkit-guide/css/mq_desktop.css +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - -#design:before { - content : "CSS thinks you are viewing this page with a full desktop browser." -} - diff --git a/examples/webkit/webkit-guide/css/mq_mobile.css b/examples/webkit/webkit-guide/css/mq_mobile.css deleted file mode 100644 index 91a6872b43..0000000000 --- a/examples/webkit/webkit-guide/css/mq_mobile.css +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - -#design:before { - content : "CSS thinks you are viewing this page with a non-touch mobile browser." -} diff --git a/examples/webkit/webkit-guide/css/mq_touch.css b/examples/webkit/webkit-guide/css/mq_touch.css deleted file mode 100644 index 3dec1f67b6..0000000000 --- a/examples/webkit/webkit-guide/css/mq_touch.css +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background : #aaaaaa; - font-family : sans-serif; - font-weight : bold; -} - -h1,h2,h3,h4 { - text-align : center; -} - -section { - position : absolute; - top : 0; - left : 0; - right : 0; - bottom : 0; -} - -article { - background : #ffffff; - border-radius : 1.0em; - padding : 1.0em; - margin : 1em; - min-height : 50%; -} - -#design:before { - content : "CSS thinks you are viewing this page with a touch-based mobile browser." -} diff --git a/examples/webkit/webkit-guide/css/mqlayout_desktop.css b/examples/webkit/webkit-guide/css/mqlayout_desktop.css deleted file mode 100644 index aff0d7f350..0000000000 --- a/examples/webkit/webkit-guide/css/mqlayout_desktop.css +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* Desktop UI */ - -body { - font-family : sans-serif; - font-weight : bold; - min-width : 60em; -} - -nav, body > section, header, footer { - border-radius : 0.5em; - padding : 0.5em; -} - -nav, section { - min-height : 30em; -} - -header { - background-color : pink; - height : 3em; - margin-bottom : 1em; -} - -section#main { - background-color : lightgreen; - float : left; - margin-bottom : 1em; - margin-left : 2%; - min-width : 60%; -} - -nav { - background-color : lightblue; - float : left; - margin-bottom : 1em; - width : 15%; -} - -section#sidebar { - background-color : plum; - float : left; - margin-bottom : 1em; - margin-left : 2%; - width : 15%; -} - -footer { - background-color : gold; - clear : both; - height : 3em; -} - diff --git a/examples/webkit/webkit-guide/css/mqlayout_mobile.css b/examples/webkit/webkit-guide/css/mqlayout_mobile.css deleted file mode 100644 index db49f8050d..0000000000 --- a/examples/webkit/webkit-guide/css/mqlayout_mobile.css +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* Mobile UI */ - -body { - font-family : sans-serif; - font-weight : bold; -} - -nav, body > section, header, footer { - padding : 0.5em; -} - -header { - display : none; -} - -section#main { - background-color : lightgreen; - margin-bottom : 1em; -} - -nav:after { - float : right; - content : '[ICON]'; -} - -nav:before { - content : 'SIMPLE '; -} - -nav { - background-color : lightblue; - margin-bottom : 1em; -} - -section#sidebar { - display : none; -} - -footer { - background-color : gold; -} - diff --git a/examples/webkit/webkit-guide/css/mqlayout_touch.css b/examples/webkit/webkit-guide/css/mqlayout_touch.css deleted file mode 100644 index c98e40c1ad..0000000000 --- a/examples/webkit/webkit-guide/css/mqlayout_touch.css +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* Touch UI */ - -body { - font-family : sans-serif; - font-weight : bold; -} - -nav, body > section, header, footer { - border-radius : 0.5em; - padding : 0.5em; -} - -header { - background-color : pink; - margin-bottom : 1em; - float : left; - width : 30%; - height : 3em; -} - -section#main { - background-color : lightgreen; - margin-bottom : 1em; - min-height : 20em; -} - -nav:before { - content : 'TOUCH '; -} - -nav { - background-color : lightblue; - margin-bottom : 1em; - margin-left : 40%; - max-width : 60%; - height : 3em; -} - -section#sidebar { - display : none; -} - -footer { - background-color : gold; -} - diff --git a/examples/webkit/webkit-guide/css/storage.css b/examples/webkit/webkit-guide/css/storage.css deleted file mode 100644 index 5984512043..0000000000 --- a/examples/webkit/webkit-guide/css/storage.css +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -body { - background-color : #aaaaaa; - font-family : sans-serif; - padding: 1em; -} - -body.off > h1 { - background-color : pink; - background-image : url(../img/offline.png), -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#ffffff)) -; -} - -body.on > h1 { - background-color : lightgreen; - background-image : url(../img/online.png), -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#ffffff)) -; -} - -body.unknown > h1 { - background-image : url(../img/offline_idle.png), -webkit-gradient(linear,center top,center bottom,from(#ffffff),to(#ffffff)); -} - - -h1 { - background-color : #ffffff; - background-repeat : no-repeat; - background-position : 0.5em center, 0 0; - height : 1.25em; - border-radius : 0.5em; - margin : 0.0em; - padding : 0.5em; - text-align : center; - font-size : 18px; -} - -form.show { - display : block; - z-index : 99; -} - -form.hide { - display : none; -} - -#cred { - background : #ffffff; - padding : 1em; - border-radius : 1.0em; - position : absolute; - left : 1.0em;; - right : 1.0em;; - top : 1.0em;; - bottom : 1.0em;; -} - -#cred > input, #email > input { - height : 2.0em; - width : 95%; - border-radius : 0.5em; - padding-left : 0.5em; -} - -#cred > img { - float : right; -} - -#cred > div:first-of-type { - margin-top : 2em; -} - -#cred > div, #email > div { - font-weight : bold; - margin : 0.5em; -} - -#cred > input[type='submit'] { - background : lightgreen; - font-weight : bold; -} - -#cred > input[type='submit']:active { - background : #777777; - color : #ffffff; -} - -#cred > input.validate:invalid { - background : pink; -} - -#cred > input.validate:invalid:after { - content : "need!"; -} - -#cred > input { - background : #ffffff; - -webkit-transition : all 1s linear; -} - -#openform { - float : right; -} - -#email { - background : #ffffff; - min-height : 6em; - margin-top : 1em; - border-radius : 0.5em; - padding : 0.5em; -} - -textarea { - min-height : 10em; - width : 95%; - border-radius : 0.5em; -} - diff --git a/examples/webkit/webkit-guide/css3_backgrounds.htm b/examples/webkit/webkit-guide/css3_backgrounds.htm deleted file mode 100644 index 3d85c68af8..0000000000 --- a/examples/webkit/webkit-guide/css3_backgrounds.htm +++ /dev/null @@ -1,87 +0,0 @@ - - - - - -Accordion Tabs - - - -

    Accordion Tabs

    -
    -
    Option 1
    -
    -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do -eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad -minim veniam, quis nostrud exercitation ullamco laboris nisi ut -aliquip ex ea commodo consequat. -
    -
    Option 2
    -
    -Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris -nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, -consectetur adipisicing elit, sed do eiusmod tempor incididunt ut -labore et dolore magna aliqua. -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do -eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad -minim veniam, quis nostrud exercitation ullamco laboris nisi ut -aliquip ex ea commodo consequat. -
    -
    Option 3
    -
    -Lorem ipsum dolor sit amet, quis nostrud exercitation ullamco laboris -nisi ut aliquip ex ea commodo consequat. -
    -
    Option 4
    -
    -Lorem ipsum dolor sit amet, sed do eiusmod tempor incididunt ut labore -et dolore magna aliqua. Ut enim ad minim veniam, consectetur -adipisicing elit, quis nostrud exercitation ullamco laboris nisi ut -aliquip ex ea commodo consequat. Consectetur adipisicing elit, ut -enim ad minim veniam, sed do eiusmod tempor incididunt ut labore et -dolore magna aliqua. -
    -
    - - - - - diff --git a/examples/webkit/webkit-guide/css3_border-img.htm b/examples/webkit/webkit-guide/css3_border-img.htm deleted file mode 100644 index 64ab267790..0000000000 --- a/examples/webkit/webkit-guide/css3_border-img.htm +++ /dev/null @@ -1,78 +0,0 @@ - - - - - -border-image - - - -
    -
    -

    border-image

    - -

    -Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante. -

    - -
    - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. - -
    - -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. -

    - -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/css3_grad-radial.htm b/examples/webkit/webkit-guide/css3_grad-radial.htm deleted file mode 100644 index ff6fdfefb7..0000000000 --- a/examples/webkit/webkit-guide/css3_grad-radial.htm +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - -Radial Gradient - - - - -
    -
    -

    Radial Gradient

    - -Touch within the main content area. - -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/css3_gradientBack.htm b/examples/webkit/webkit-guide/css3_gradientBack.htm deleted file mode 100644 index c7166ec780..0000000000 --- a/examples/webkit/webkit-guide/css3_gradientBack.htm +++ /dev/null @@ -1,79 +0,0 @@ - - - - - -Background Gradient - - - -
    -
    -

    Background Gradient

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css3_gradientBackStop.htm b/examples/webkit/webkit-guide/css3_gradientBackStop.htm deleted file mode 100644 index ece3cdf757..0000000000 --- a/examples/webkit/webkit-guide/css3_gradientBackStop.htm +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -Background Gradient + stop-color - - - -
    -
    -

    Background Gradient
    with stop-color

    - -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    - -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css3_gradientButton.htm b/examples/webkit/webkit-guide/css3_gradientButton.htm deleted file mode 100644 index 39e5ff907c..0000000000 --- a/examples/webkit/webkit-guide/css3_gradientButton.htm +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - -Beveled Buttons - - - - - - - diff --git a/examples/webkit/webkit-guide/css3_mask-grad.htm b/examples/webkit/webkit-guide/css3_mask-grad.htm deleted file mode 100644 index 4a5b7779b1..0000000000 --- a/examples/webkit/webkit-guide/css3_mask-grad.htm +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - -Webkit Masks - - - -
    -
    -

    Webkit Masks

    - - - - - - - - - - -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/css3_mask-img.htm b/examples/webkit/webkit-guide/css3_mask-img.htm deleted file mode 100644 index dd48b7b1fe..0000000000 --- a/examples/webkit/webkit-guide/css3_mask-img.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -Webkit Masks - - - -
    -
    - -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/css3_multicol.htm b/examples/webkit/webkit-guide/css3_multicol.htm deleted file mode 100644 index 56bf22d3d1..0000000000 --- a/examples/webkit/webkit-guide/css3_multicol.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - -Animated Banners - - - -
    -
    -

    Animated Banners

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. - -

    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - diff --git a/examples/webkit/webkit-guide/css3_reflect.htm b/examples/webkit/webkit-guide/css3_reflect.htm deleted file mode 100644 index 39b5f77d32..0000000000 --- a/examples/webkit/webkit-guide/css3_reflect.htm +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - -Webkit Reflections - - - -
    -
    -

    Webkit Reflections

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. -

    - -
    - -
    - -

    Aliquam erat volutpat. Mauris tempor, urna at dignissim -pellentesque, velit lacus dictum sem, non porttitor felis nulla nec -risus. Donec a massa felis, a congue purus. Nullam et turpis -diam. Aenean vestibulum egestas metus, eu sodales dolor venenatis -quis. Aenean augue orci, facilisis et convallis ut, egestas at neque. -

    - -

    Webkit Reflections

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -

    Webkit Reflections

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css3_scroll.htm b/examples/webkit/webkit-guide/css3_scroll.htm deleted file mode 100644 index c56707e853..0000000000 --- a/examples/webkit/webkit-guide/css3_scroll.htm +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -Custom Scrollbars - - - -
    -
    -

    Custom Scrollbars

    - -

    -Unlike standard text, linebreaks cannot appear arbitrarily within -blocks of code. Wide lines may be difficult to read within a -narrow-screen mobile interface: -

    - -
    -window.onload = function() {
    -  var aside = document.querySelector('#related');
    -  document.querySelector('#main').addEventListener('mouseup', function(event){
    -    var thresholdDec = 0.5;
    -    var totalHeight = event.currentTarget.scrollHeight;
    -    var tapHeight = event.layerY;
    -    var tapHeightDec = tapHeight / totalHeight;
    -    var minHeight = 360;
    -    if ( tapHeight < minHeight ) aside.className = '';
    -    if (tapHeightDec > thresholdDec ) {
    -      aside.className = 'visible';
    -    }
    -    else {
    -      aside.className = '';
    -    }
    -  });
    -};
    -
    - -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    - -
    -
    - - diff --git a/examples/webkit/webkit-guide/css3_sel-nth.htm b/examples/webkit/webkit-guide/css3_sel-nth.htm deleted file mode 100644 index 05e6bba340..0000000000 --- a/examples/webkit/webkit-guide/css3_sel-nth.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - -CSS-only Grid Layout - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css3_shadow.htm b/examples/webkit/webkit-guide/css3_shadow.htm deleted file mode 100644 index 85547e38b1..0000000000 --- a/examples/webkit/webkit-guide/css3_shadow.htm +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - -Navigation Icon Feedback - - - - -
    -
    -

    Navigation Icon Feedback

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. Aenean elementum arcu -sed nibh faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, -urna at dignissim pellentesque, velit lacus dictum sem, non porttitor -felis nulla nec risus. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css3_text-overflow.htm b/examples/webkit/webkit-guide/css3_text-overflow.htm deleted file mode 100644 index 7307b6536d..0000000000 --- a/examples/webkit/webkit-guide/css3_text-overflow.htm +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - -text-overflow - - - -
    -
    -

    text-overflow

    - -
      -
    • -
      -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. Mauris tempor, urna at dignissim pellentesque, velit lacus -dictum sem, non porttitor felis nulla nec risus. -
    • -
    • -
      -Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, -id mollis risus lectus ornare nisl. Aenean elementum arcu sed nibh -faucibus pellentesque. Aliquam erat volutpat. Donec a massa felis, a -congue purus. Nullam et turpis diam. Aenean vestibulum egestas metus, -eu sodales dolor venenatis quis. Aenean augue orci, facilisis et -convallis ut, egestas at neque. -
    • -
    • -
      -Donec a massa felis, a congue purus. Nullam et turpis diam. Aenean -vestibulum egestas metus, eu sodales dolor venenatis quis. Aenean -augue orci, facilisis et convallis ut, egestas at neque. Lorem ipsum -dolor sit amet, consectetur adipiscing elit. Donec feugiat gravida -viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus ac -tellus. -
    • -
    • -
      -Aenean vestibulum egestas metus, eu sodales dolor venenatis quis. -Aenean augue orci, facilisis et convallis ut, egestas at neque. -Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus. -Donec a massa felis, a congue purus. -
    • -
    • -
      -Nullam et turpis diam. Vivamus ipsum felis, cursus sed venenatis nec, -tempus ac tellus. Lorem ipsum dolor sit amet, consectetur adipiscing -elit. Donec a massa felis, a congue purus. Aenean vestibulum egestas -metus, eu sodales dolor venenatis quis. Donec feugiat gravida -viverra. Praesent luctus, risus eu vestibulum mollis, arcu mauris -mollis ante, id mollis risus lectus ornare nisl. -
    • -
    • -
      -Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus. -Aenean elementum arcu sed nibh faucibus pellentesque. Aliquam erat -volutpat. -Donec a massa felis, a congue purus. -Aenean vestibulum egestas metus, eu sodales dolor venenatis quis. -
    • -
    • -
      -Donec feugiat gravida viverra. Praesent luctus, risus eu vestibulum -mollis, arcu mauris mollis ante, id mollis risus lectus ornare nisl. -Aliquam erat volutpat. Nullam et turpis diam. Aenean augue orci, -facilisis et convallis ut, egestas at neque. -
    • -
    - -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/css3_text-shadow.htm b/examples/webkit/webkit-guide/css3_text-shadow.htm deleted file mode 100644 index 2fa10d2e32..0000000000 --- a/examples/webkit/webkit-guide/css3_text-shadow.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -Text Shadow - - - -
    -
    -

    Text Shadow

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. -

    -

    Subhead

    -

    -Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, -id mollis risus lectus ornare nisl. Aenean elementum arcu sed nibh -faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, urna at -dignissim pellentesque, velit lacus dictum sem, non porttitor felis -nulla nec risus. Donec a massa felis, a congue purus. Nullam et turpis -diam. -

    -

    Subhead

    -

    -Aenean vestibulum egestas metus, eu sodales dolor venenatis -quis. Aenean augue orci, facilisis et convallis ut, egestas at neque. -

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/css3_text-stroke.htm b/examples/webkit/webkit-guide/css3_text-stroke.htm deleted file mode 100644 index 9f8af0e055..0000000000 --- a/examples/webkit/webkit-guide/css3_text-stroke.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -Text Stroke - - - -
    -
    -

    Text Stroke

    -

    -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus. -

    -

    Subhead

    -

    -Praesent luctus, risus eu vestibulum mollis, arcu mauris mollis ante, -id mollis risus lectus ornare nisl. Aenean elementum arcu sed nibh -faucibus pellentesque. Aliquam erat volutpat. Mauris tempor, urna at -dignissim pellentesque, velit lacus dictum sem, non porttitor felis -nulla nec risus. Donec a massa felis, a congue purus. Nullam et turpis -diam. -

    -

    Subhead

    -

    -Aenean vestibulum egestas metus, eu sodales dolor venenatis -quis. Aenean augue orci, facilisis et convallis ut, egestas at neque. -

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/form_tapper.htm b/examples/webkit/webkit-guide/form_tapper.htm deleted file mode 100644 index cf755a59f6..0000000000 --- a/examples/webkit/webkit-guide/form_tapper.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -CSS-only Tap Button Inputs - - - -
    -

    CSS-only Tap Button Inputs

    -
    -

    radio

    - - -
    - - -
    - - -

    checkbox

    - - -
    - - -
    - - -
    -
    - - - - diff --git a/examples/webkit/webkit-guide/form_toggler.htm b/examples/webkit/webkit-guide/form_toggler.htm deleted file mode 100644 index 113f450425..0000000000 --- a/examples/webkit/webkit-guide/form_toggler.htm +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - -CSS-only Toggle Button Inputs - - - -
    -

    CSS-only Toggle Button Inputs

    -
    -

    radio (default)

    - - -
    - - -
    - - -

    checkbox (default)

    - - -
    - - -
    - - -

    radio class="invert"

    - - -
    - - -
    - - -

    checkbox class="invert"

    - - -
    - - -
    - - -

    radio class="yn"

    - - -
    - - -
    - - -

    checkbox class="yn"

    - - -
    - - -
    - - -

    radio class="tf"

    - - -
    - - -
    - - -

    checkbox class="tf"

    - - -
    - - -
    - - -

    radio class="binary"

    - - - -
    - - - -
    -
    -

    (These use custom button values)

    -
    -
    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/img/border-frame.png b/examples/webkit/webkit-guide/img/border-frame.png deleted file mode 100644 index 7a0894cabc..0000000000 Binary files a/examples/webkit/webkit-guide/img/border-frame.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal1.jpg b/examples/webkit/webkit-guide/img/gal1.jpg deleted file mode 100644 index 8f9edcb2ca..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal1.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal2.jpg b/examples/webkit/webkit-guide/img/gal2.jpg deleted file mode 100644 index a2301ef22f..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal2.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal3.jpg b/examples/webkit/webkit-guide/img/gal3.jpg deleted file mode 100644 index a768530a8c..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal3.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal4.jpg b/examples/webkit/webkit-guide/img/gal4.jpg deleted file mode 100644 index 96c00015c0..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal4.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal5.jpg b/examples/webkit/webkit-guide/img/gal5.jpg deleted file mode 100644 index 6ec78fc43a..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal5.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal6.jpg b/examples/webkit/webkit-guide/img/gal6.jpg deleted file mode 100644 index 25eb95cb22..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal6.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal7.jpg b/examples/webkit/webkit-guide/img/gal7.jpg deleted file mode 100644 index b9fda2fb9d..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal7.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gal8.jpg b/examples/webkit/webkit-guide/img/gal8.jpg deleted file mode 100644 index c23e2260c3..0000000000 Binary files a/examples/webkit/webkit-guide/img/gal8.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gradient.jpg b/examples/webkit/webkit-guide/img/gradient.jpg deleted file mode 100644 index 014386e275..0000000000 Binary files a/examples/webkit/webkit-guide/img/gradient.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/gray_icon_close.png b/examples/webkit/webkit-guide/img/gray_icon_close.png deleted file mode 100644 index 8e7450153e..0000000000 Binary files a/examples/webkit/webkit-guide/img/gray_icon_close.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ag_016.png b/examples/webkit/webkit-guide/img/ic_ag_016.png deleted file mode 100644 index bb961cb393..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ag_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ag_032.png b/examples/webkit/webkit-guide/img/ic_ag_032.png deleted file mode 100644 index edb051f50e..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ag_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ag_036.png b/examples/webkit/webkit-guide/img/ic_ag_036.png deleted file mode 100644 index e555e92071..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ag_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ag_048.png b/examples/webkit/webkit-guide/img/ic_ag_048.png deleted file mode 100644 index d2d417da2e..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ag_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_al_016.png b/examples/webkit/webkit-guide/img/ic_al_016.png deleted file mode 100644 index 0f1c0240fb..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_al_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_al_032.png b/examples/webkit/webkit-guide/img/ic_al_032.png deleted file mode 100644 index 5727a5104e..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_al_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_al_036.png b/examples/webkit/webkit-guide/img/ic_al_036.png deleted file mode 100644 index 76382779b8..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_al_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_al_048.png b/examples/webkit/webkit-guide/img/ic_al_048.png deleted file mode 100644 index 9671d86944..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_al_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ar_016.png b/examples/webkit/webkit-guide/img/ic_ar_016.png deleted file mode 100644 index fa91e96dca..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ar_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ar_032.png b/examples/webkit/webkit-guide/img/ic_ar_032.png deleted file mode 100644 index d899c41fdb..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ar_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ar_036.png b/examples/webkit/webkit-guide/img/ic_ar_036.png deleted file mode 100644 index 836593f4bc..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ar_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ar_048.png b/examples/webkit/webkit-guide/img/ic_ar_048.png deleted file mode 100644 index e1c77aca74..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ar_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_b_016.png b/examples/webkit/webkit-guide/img/ic_b_016.png deleted file mode 100644 index a0ebdf7964..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_b_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_b_032.png b/examples/webkit/webkit-guide/img/ic_b_032.png deleted file mode 100644 index f5571f2bb9..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_b_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_b_036.png b/examples/webkit/webkit-guide/img/ic_b_036.png deleted file mode 100644 index 4aff7eb601..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_b_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_b_048.png b/examples/webkit/webkit-guide/img/ic_b_048.png deleted file mode 100644 index b84434cec4..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_b_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_be_016.png b/examples/webkit/webkit-guide/img/ic_be_016.png deleted file mode 100644 index 0297cd827d..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_be_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_be_032.png b/examples/webkit/webkit-guide/img/ic_be_032.png deleted file mode 100644 index 5c5b9cd9e1..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_be_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_be_036.png b/examples/webkit/webkit-guide/img/ic_be_036.png deleted file mode 100644 index 96ec4bb4ca..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_be_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_be_048.png b/examples/webkit/webkit-guide/img/ic_be_048.png deleted file mode 100644 index afcdf183dd..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_be_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_c_016.png b/examples/webkit/webkit-guide/img/ic_c_016.png deleted file mode 100644 index a3cc4cfadf..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_c_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_c_032.png b/examples/webkit/webkit-guide/img/ic_c_032.png deleted file mode 100644 index 404babecf1..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_c_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_c_036.png b/examples/webkit/webkit-guide/img/ic_c_036.png deleted file mode 100644 index 78d71500d9..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_c_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_c_048.png b/examples/webkit/webkit-guide/img/ic_c_048.png deleted file mode 100644 index 73462ad394..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_c_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ca_016.png b/examples/webkit/webkit-guide/img/ic_ca_016.png deleted file mode 100644 index af4c37b0e5..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ca_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ca_032.png b/examples/webkit/webkit-guide/img/ic_ca_032.png deleted file mode 100644 index 6ac8db4ce6..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ca_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ca_036.png b/examples/webkit/webkit-guide/img/ic_ca_036.png deleted file mode 100644 index 19988c165d..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ca_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ca_048.png b/examples/webkit/webkit-guide/img/ic_ca_048.png deleted file mode 100644 index 0349061038..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ca_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cl_016.png b/examples/webkit/webkit-guide/img/ic_cl_016.png deleted file mode 100644 index e9b421e70c..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cl_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cl_032.png b/examples/webkit/webkit-guide/img/ic_cl_032.png deleted file mode 100644 index f5968d5dfe..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cl_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cl_036.png b/examples/webkit/webkit-guide/img/ic_cl_036.png deleted file mode 100644 index 2a6721d780..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cl_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cl_048.png b/examples/webkit/webkit-guide/img/ic_cl_048.png deleted file mode 100644 index f32981fe81..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cl_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cu_016.png b/examples/webkit/webkit-guide/img/ic_cu_016.png deleted file mode 100644 index 129f99ffd1..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cu_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cu_032.png b/examples/webkit/webkit-guide/img/ic_cu_032.png deleted file mode 100644 index a07933ea68..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cu_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cu_036.png b/examples/webkit/webkit-guide/img/ic_cu_036.png deleted file mode 100644 index 5eb6ed6363..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cu_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_cu_048.png b/examples/webkit/webkit-guide/img/ic_cu_048.png deleted file mode 100644 index f21593cf78..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_cu_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_f_016.png b/examples/webkit/webkit-guide/img/ic_f_016.png deleted file mode 100644 index ff2e3fb5f4..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_f_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_f_032.png b/examples/webkit/webkit-guide/img/ic_f_032.png deleted file mode 100644 index 3424799317..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_f_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_f_036.png b/examples/webkit/webkit-guide/img/ic_f_036.png deleted file mode 100644 index 019b7032a6..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_f_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_f_048.png b/examples/webkit/webkit-guide/img/ic_f_048.png deleted file mode 100644 index 567d30310a..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_f_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_fe_016.png b/examples/webkit/webkit-guide/img/ic_fe_016.png deleted file mode 100644 index e6d9b829b9..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_fe_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_fe_032.png b/examples/webkit/webkit-guide/img/ic_fe_032.png deleted file mode 100644 index f2b4e4b417..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_fe_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_fe_036.png b/examples/webkit/webkit-guide/img/ic_fe_036.png deleted file mode 100644 index 2aa81b5fec..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_fe_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_fe_048.png b/examples/webkit/webkit-guide/img/ic_fe_048.png deleted file mode 100644 index b6914735d9..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_fe_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_h_016.png b/examples/webkit/webkit-guide/img/ic_h_016.png deleted file mode 100644 index 957a1ffabe..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_h_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_h_032.png b/examples/webkit/webkit-guide/img/ic_h_032.png deleted file mode 100644 index 824620d4a2..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_h_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_h_036.png b/examples/webkit/webkit-guide/img/ic_h_036.png deleted file mode 100644 index fba59a5d27..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_h_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_h_048.png b/examples/webkit/webkit-guide/img/ic_h_048.png deleted file mode 100644 index f75822c3aa..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_h_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_he_016.png b/examples/webkit/webkit-guide/img/ic_he_016.png deleted file mode 100644 index 33fe83677f..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_he_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_he_032.png b/examples/webkit/webkit-guide/img/ic_he_032.png deleted file mode 100644 index 425c525b69..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_he_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_he_036.png b/examples/webkit/webkit-guide/img/ic_he_036.png deleted file mode 100644 index a976aece8b..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_he_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_he_048.png b/examples/webkit/webkit-guide/img/ic_he_048.png deleted file mode 100644 index f8f9d4d853..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_he_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_k_016.png b/examples/webkit/webkit-guide/img/ic_k_016.png deleted file mode 100644 index 860bd62f96..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_k_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_k_032.png b/examples/webkit/webkit-guide/img/ic_k_032.png deleted file mode 100644 index a14f2c65e9..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_k_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_k_036.png b/examples/webkit/webkit-guide/img/ic_k_036.png deleted file mode 100644 index 49f19e6df0..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_k_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_k_048.png b/examples/webkit/webkit-guide/img/ic_k_048.png deleted file mode 100644 index a7515cd782..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_k_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_li_016.png b/examples/webkit/webkit-guide/img/ic_li_016.png deleted file mode 100644 index c16d81a4bc..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_li_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_li_032.png b/examples/webkit/webkit-guide/img/ic_li_032.png deleted file mode 100644 index 3a34f37066..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_li_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_li_036.png b/examples/webkit/webkit-guide/img/ic_li_036.png deleted file mode 100644 index e5b97a7a2e..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_li_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_li_048.png b/examples/webkit/webkit-guide/img/ic_li_048.png deleted file mode 100644 index 7b030e4cd7..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_li_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_mg_016.png b/examples/webkit/webkit-guide/img/ic_mg_016.png deleted file mode 100644 index 2606336415..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_mg_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_mg_032.png b/examples/webkit/webkit-guide/img/ic_mg_032.png deleted file mode 100644 index 2f9d03e6b0..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_mg_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_mg_036.png b/examples/webkit/webkit-guide/img/ic_mg_036.png deleted file mode 100644 index 584078db84..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_mg_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_mg_048.png b/examples/webkit/webkit-guide/img/ic_mg_048.png deleted file mode 100644 index 8cd2f3acc7..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_mg_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_n_016.png b/examples/webkit/webkit-guide/img/ic_n_016.png deleted file mode 100644 index 90e8f9fec9..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_n_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_n_032.png b/examples/webkit/webkit-guide/img/ic_n_032.png deleted file mode 100644 index afeb47a105..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_n_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_n_036.png b/examples/webkit/webkit-guide/img/ic_n_036.png deleted file mode 100644 index 0b7a11deed..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_n_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_n_048.png b/examples/webkit/webkit-guide/img/ic_n_048.png deleted file mode 100644 index c0d7c0699e..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_n_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_na_016.png b/examples/webkit/webkit-guide/img/ic_na_016.png deleted file mode 100644 index 7888d0f9c0..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_na_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_na_032.png b/examples/webkit/webkit-guide/img/ic_na_032.png deleted file mode 100644 index 801ddca50b..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_na_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_na_036.png b/examples/webkit/webkit-guide/img/ic_na_036.png deleted file mode 100644 index a6878d45d7..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_na_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_na_048.png b/examples/webkit/webkit-guide/img/ic_na_048.png deleted file mode 100644 index 76adaf479c..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_na_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ne_016.png b/examples/webkit/webkit-guide/img/ic_ne_016.png deleted file mode 100644 index 64562fc2d5..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ne_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ne_032.png b/examples/webkit/webkit-guide/img/ic_ne_032.png deleted file mode 100644 index fab5cd8fcb..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ne_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ne_036.png b/examples/webkit/webkit-guide/img/ic_ne_036.png deleted file mode 100644 index 41092bf3e7..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ne_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ne_048.png b/examples/webkit/webkit-guide/img/ic_ne_048.png deleted file mode 100644 index 4ec0db0806..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ne_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ni_016.png b/examples/webkit/webkit-guide/img/ic_ni_016.png deleted file mode 100644 index 9b88e368a2..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ni_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ni_032.png b/examples/webkit/webkit-guide/img/ic_ni_032.png deleted file mode 100644 index fc4fcf3ebc..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ni_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ni_036.png b/examples/webkit/webkit-guide/img/ic_ni_036.png deleted file mode 100644 index 9d527470bb..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ni_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_ni_048.png b/examples/webkit/webkit-guide/img/ic_ni_048.png deleted file mode 100644 index b563c50361..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_ni_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_o_016.png b/examples/webkit/webkit-guide/img/ic_o_016.png deleted file mode 100644 index a95460d457..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_o_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_o_032.png b/examples/webkit/webkit-guide/img/ic_o_032.png deleted file mode 100644 index 1d4864dded..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_o_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_o_036.png b/examples/webkit/webkit-guide/img/ic_o_036.png deleted file mode 100644 index 7f5dd02ed2..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_o_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_o_048.png b/examples/webkit/webkit-guide/img/ic_o_048.png deleted file mode 100644 index 7461a8e9e4..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_o_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_pt_016.png b/examples/webkit/webkit-guide/img/ic_pt_016.png deleted file mode 100644 index 513eb97a30..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_pt_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_pt_032.png b/examples/webkit/webkit-guide/img/ic_pt_032.png deleted file mode 100644 index 1550c399c8..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_pt_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_pt_036.png b/examples/webkit/webkit-guide/img/ic_pt_036.png deleted file mode 100644 index 7eec4d0ce4..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_pt_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_pt_048.png b/examples/webkit/webkit-guide/img/ic_pt_048.png deleted file mode 100644 index 50dece6610..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_pt_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_si_016.png b/examples/webkit/webkit-guide/img/ic_si_016.png deleted file mode 100644 index e639b683ae..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_si_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_si_032.png b/examples/webkit/webkit-guide/img/ic_si_032.png deleted file mode 100644 index 8657e6276f..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_si_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_si_036.png b/examples/webkit/webkit-guide/img/ic_si_036.png deleted file mode 100644 index ffe0ee27fc..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_si_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_si_048.png b/examples/webkit/webkit-guide/img/ic_si_048.png deleted file mode 100644 index 5b9400dbdc..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_si_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_zn_016.png b/examples/webkit/webkit-guide/img/ic_zn_016.png deleted file mode 100644 index 11e5705130..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_zn_016.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_zn_032.png b/examples/webkit/webkit-guide/img/ic_zn_032.png deleted file mode 100644 index cb78a5c139..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_zn_032.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_zn_036.png b/examples/webkit/webkit-guide/img/ic_zn_036.png deleted file mode 100644 index 66abffd40d..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_zn_036.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/ic_zn_048.png b/examples/webkit/webkit-guide/img/ic_zn_048.png deleted file mode 100644 index d8361ad6c0..0000000000 Binary files a/examples/webkit/webkit-guide/img/ic_zn_048.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_check.png b/examples/webkit/webkit-guide/img/icon_check.png deleted file mode 100644 index 294b62d24d..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_check.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_check_x24green.png b/examples/webkit/webkit-guide/img/icon_check_x24green.png deleted file mode 100644 index 803928c231..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_check_x24green.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_dismiss.png b/examples/webkit/webkit-guide/img/icon_dismiss.png deleted file mode 100644 index e7a842640a..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_dismiss.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_dismiss_x22.png b/examples/webkit/webkit-guide/img/icon_dismiss_x22.png deleted file mode 100644 index e52a62a598..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_dismiss_x22.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_drill-down.png b/examples/webkit/webkit-guide/img/icon_drill-down.png deleted file mode 100644 index 7928c6e59e..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_drill-down.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_drill-down_x32.png b/examples/webkit/webkit-guide/img/icon_drill-down_x32.png deleted file mode 100644 index 477d7cda0d..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_drill-down_x32.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_drill-up.png b/examples/webkit/webkit-guide/img/icon_drill-up.png deleted file mode 100644 index ff7594054d..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_drill-up.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_drill-up_x32.png b/examples/webkit/webkit-guide/img/icon_drill-up_x32.png deleted file mode 100644 index d63fe083a1..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_drill-up_x32.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_expand-nav.png b/examples/webkit/webkit-guide/img/icon_expand-nav.png deleted file mode 100644 index 7ec5aa68d1..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_expand-nav.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed.png b/examples/webkit/webkit-guide/img/icon_head-collapsed.png deleted file mode 100644 index ed47838b5b..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_head-collapsed.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png b/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png deleted file mode 100644 index 6892dc08a6..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_head-collapsed_x13.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded.png b/examples/webkit/webkit-guide/img/icon_head-expanded.png deleted file mode 100644 index ee7e0a767a..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_head-expanded.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png b/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png deleted file mode 100644 index 40e8eeb4c1..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_head-expanded_x13.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_info.png b/examples/webkit/webkit-guide/img/icon_info.png deleted file mode 100644 index b70c760621..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_info.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_info_x24.png b/examples/webkit/webkit-guide/img/icon_info_x24.png deleted file mode 100644 index 9f4f352c84..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_info_x24.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-doc.png b/examples/webkit/webkit-guide/img/icon_link-doc.png deleted file mode 100644 index fc9bd54e06..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-doc.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-email.png b/examples/webkit/webkit-guide/img/icon_link-email.png deleted file mode 100644 index ef5f95d318..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-email.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-external.png b/examples/webkit/webkit-guide/img/icon_link-external.png deleted file mode 100644 index 47ddd807e4..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-external.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-pdf.png b/examples/webkit/webkit-guide/img/icon_link-pdf.png deleted file mode 100644 index fb90a6a2b9..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-pdf.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-ppt.png b/examples/webkit/webkit-guide/img/icon_link-ppt.png deleted file mode 100644 index c6a532878c..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-ppt.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-rss.png b/examples/webkit/webkit-guide/img/icon_link-rss.png deleted file mode 100644 index d3cf2c4916..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-rss.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-sms.png b/examples/webkit/webkit-guide/img/icon_link-sms.png deleted file mode 100644 index f36de100f8..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-sms.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-tel.png b/examples/webkit/webkit-guide/img/icon_link-tel.png deleted file mode 100644 index 7b665ee5de..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-tel.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_link-xls.png b/examples/webkit/webkit-guide/img/icon_link-xls.png deleted file mode 100644 index 977c868eae..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_link-xls.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_list-all.png b/examples/webkit/webkit-guide/img/icon_list-all.png deleted file mode 100644 index 97ce879fb8..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_list-all.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_list-all_circ.png b/examples/webkit/webkit-guide/img/icon_list-all_circ.png deleted file mode 100644 index 6c5828e835..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_list-all_circ.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_nav-start.png b/examples/webkit/webkit-guide/img/icon_nav-start.png deleted file mode 100644 index cbe127fdc9..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_nav-start.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_nav-top.png b/examples/webkit/webkit-guide/img/icon_nav-top.png deleted file mode 100644 index d57d3efa11..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_nav-top.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_nav-up.png b/examples/webkit/webkit-guide/img/icon_nav-up.png deleted file mode 100644 index bab32593e3..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_nav-up.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_nav_end.png b/examples/webkit/webkit-guide/img/icon_nav_end.png deleted file mode 100644 index 6d7dd319b4..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_nav_end.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_question.png b/examples/webkit/webkit-guide/img/icon_question.png deleted file mode 100644 index 28c2ae1f12..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_question.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_scroll-left.png b/examples/webkit/webkit-guide/img/icon_scroll-left.png deleted file mode 100644 index 38b3c3fa0e..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_scroll-left.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_scroll-right.png b/examples/webkit/webkit-guide/img/icon_scroll-right.png deleted file mode 100644 index 4d6191942b..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_scroll-right.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/icon_trash.png b/examples/webkit/webkit-guide/img/icon_trash.png deleted file mode 100644 index b5f6eaae73..0000000000 Binary files a/examples/webkit/webkit-guide/img/icon_trash.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land1.jpg b/examples/webkit/webkit-guide/img/land1.jpg deleted file mode 100644 index 05b11d5393..0000000000 Binary files a/examples/webkit/webkit-guide/img/land1.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land2.jpg b/examples/webkit/webkit-guide/img/land2.jpg deleted file mode 100644 index 0f504b4106..0000000000 Binary files a/examples/webkit/webkit-guide/img/land2.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land3.jpg b/examples/webkit/webkit-guide/img/land3.jpg deleted file mode 100644 index fd86c950e8..0000000000 Binary files a/examples/webkit/webkit-guide/img/land3.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land4.jpg b/examples/webkit/webkit-guide/img/land4.jpg deleted file mode 100644 index bcf33daf7f..0000000000 Binary files a/examples/webkit/webkit-guide/img/land4.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land5.jpg b/examples/webkit/webkit-guide/img/land5.jpg deleted file mode 100644 index c8d550923d..0000000000 Binary files a/examples/webkit/webkit-guide/img/land5.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land6.jpg b/examples/webkit/webkit-guide/img/land6.jpg deleted file mode 100644 index 2762864634..0000000000 Binary files a/examples/webkit/webkit-guide/img/land6.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land7.jpg b/examples/webkit/webkit-guide/img/land7.jpg deleted file mode 100644 index 6ac6d88966..0000000000 Binary files a/examples/webkit/webkit-guide/img/land7.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/land8.jpg b/examples/webkit/webkit-guide/img/land8.jpg deleted file mode 100644 index 37c51df15e..0000000000 Binary files a/examples/webkit/webkit-guide/img/land8.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/mask.png b/examples/webkit/webkit-guide/img/mask.png deleted file mode 100644 index f9764b54aa..0000000000 Binary files a/examples/webkit/webkit-guide/img/mask.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal1.jpg b/examples/webkit/webkit-guide/img/tmp/gal1.jpg deleted file mode 100644 index 8f9edcb2ca..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal1.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal2.jpg b/examples/webkit/webkit-guide/img/tmp/gal2.jpg deleted file mode 100644 index a2301ef22f..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal2.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal3.jpg b/examples/webkit/webkit-guide/img/tmp/gal3.jpg deleted file mode 100644 index a768530a8c..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal3.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal4.jpg b/examples/webkit/webkit-guide/img/tmp/gal4.jpg deleted file mode 100644 index 96c00015c0..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal4.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal5.jpg b/examples/webkit/webkit-guide/img/tmp/gal5.jpg deleted file mode 100644 index 6ec78fc43a..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal5.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal6.jpg b/examples/webkit/webkit-guide/img/tmp/gal6.jpg deleted file mode 100644 index 25eb95cb22..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal6.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal7.jpg b/examples/webkit/webkit-guide/img/tmp/gal7.jpg deleted file mode 100644 index b9fda2fb9d..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal7.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/gal8.jpg b/examples/webkit/webkit-guide/img/tmp/gal8.jpg deleted file mode 100644 index c23e2260c3..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/gal8.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land1.jpg b/examples/webkit/webkit-guide/img/tmp/land1.jpg deleted file mode 100644 index 05b11d5393..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land1.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land2.jpg b/examples/webkit/webkit-guide/img/tmp/land2.jpg deleted file mode 100644 index 0f504b4106..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land2.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land3.jpg b/examples/webkit/webkit-guide/img/tmp/land3.jpg deleted file mode 100644 index fd86c950e8..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land3.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land4.jpg b/examples/webkit/webkit-guide/img/tmp/land4.jpg deleted file mode 100644 index bcf33daf7f..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land4.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land5.jpg b/examples/webkit/webkit-guide/img/tmp/land5.jpg deleted file mode 100644 index c8d550923d..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land5.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land6.jpg b/examples/webkit/webkit-guide/img/tmp/land6.jpg deleted file mode 100644 index 2762864634..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land6.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land7.jpg b/examples/webkit/webkit-guide/img/tmp/land7.jpg deleted file mode 100644 index 6ac6d88966..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land7.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tmp/land8.jpg b/examples/webkit/webkit-guide/img/tmp/land8.jpg deleted file mode 100644 index 37c51df15e..0000000000 Binary files a/examples/webkit/webkit-guide/img/tmp/land8.jpg and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal1.png b/examples/webkit/webkit-guide/img/tnail_gal1.png deleted file mode 100644 index 6c83482e25..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal1.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal2.png b/examples/webkit/webkit-guide/img/tnail_gal2.png deleted file mode 100644 index f090b68959..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal2.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal3.png b/examples/webkit/webkit-guide/img/tnail_gal3.png deleted file mode 100644 index 6cc257b490..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal3.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal4.png b/examples/webkit/webkit-guide/img/tnail_gal4.png deleted file mode 100644 index ae9983ccbc..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal4.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal5.png b/examples/webkit/webkit-guide/img/tnail_gal5.png deleted file mode 100644 index 58d764c9a9..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal5.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal6.png b/examples/webkit/webkit-guide/img/tnail_gal6.png deleted file mode 100644 index f5d0b8b657..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal6.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal7.png b/examples/webkit/webkit-guide/img/tnail_gal7.png deleted file mode 100644 index 8d33ea69f6..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal7.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/img/tnail_gal8.png b/examples/webkit/webkit-guide/img/tnail_gal8.png deleted file mode 100644 index 61e1431ab5..0000000000 Binary files a/examples/webkit/webkit-guide/img/tnail_gal8.png and /dev/null differ diff --git a/examples/webkit/webkit-guide/js/anim_accord.js b/examples/webkit/webkit-guide/js/anim_accord.js deleted file mode 100644 index cc95b7f7c9..0000000000 --- a/examples/webkit/webkit-guide/js/anim_accord.js +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - - initDT(); - document.querySelector('body').addEventListener('click', function(event){ - var dl = document.querySelector('#accordion'); - var ct = event.currentTarget; - var t = event.target; - var dt; - if (t.id == 'accordion' && t.className == 'collapsed') { - dl.className = 'expanded'; - } - else if (t.tagName == 'DT' && t.parentNode.id == 'accordion') { - if ( t.className == 'collapsed' ) { - t.className = 'expanded'; - } - else { - t.className = 'collapsed'; - } - } - else { - dl.className = 'collapsed'; - initDT(); - } - }); -}; - -function initDT() { - var el = nlToAr(document.querySelectorAll('#accordion > dt')); - el.forEach( function(l){ l.className = 'collapsed'; }); -} - -function nlToAr(nl) { - var a = new Array(); - var l = nl.length; - var i = l - 1; - a[i] = true; - for ( i = 0; i < l ; i++ ) { a[i] = nl[i]; } - return(a); -} diff --git a/examples/webkit/webkit-guide/js/anim_gallery.js b/examples/webkit/webkit-guide/js/anim_gallery.js deleted file mode 100644 index 050f113bb4..0000000000 --- a/examples/webkit/webkit-guide/js/anim_gallery.js +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -var app = new Function(); - -app.init = function() { - var divs = document.querySelectorAll('section > div'); - if ( divs.length < 2 ) return false; - for (var i = 0, l = divs.length ; i < l ; i++ ) { - if (i > 1) divs[i].className = 'hideR'; - divs[i].addEventListener('click', app.navigate ); - } - divs[0].className = 'selected'; - divs[1].className = 'queueR'; -}; - -app.navigate = function(event) { - var el, n1, n2, p1, p2; - el = event.currentTarget; - n1 = el.nextSibling; - if (n1) n2 = el.nextSibling.nextSibling; - p1 = el.previousSibling; - if (p1) p2 = el.previousSibling.previousSibling; - if ( el.className == 'selected' ) { - if ( el.id == 'reveal') { - el.id = ''; - } - else { - el.id = 'reveal'; - } - return false; - } - if (n1) { n1.className = 'queueR'; n1.id = ''} - if (n2) { n2.className = 'hideR'; n2.id = '' } - if (p1) { p1.className = 'queueL'; p1.id = '' } - if (p2) { p2.className = 'hideL'; p2.id = '' } - el.className = 'selected'; -}; - -window.onload = function() { - // alert(app.init); - app.init(); -}; diff --git a/examples/webkit/webkit-guide/js/anim_panel.js b/examples/webkit/webkit-guide/js/anim_panel.js deleted file mode 100644 index e6cc5e6d8f..0000000000 --- a/examples/webkit/webkit-guide/js/anim_panel.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - document.querySelector('body').addEventListener('click', function(event){ - document.querySelector('#panel').className = 'collapsed'; - }); -} - -function share() { - document.querySelector('#panel').className = 'expanded'; - event.stopPropagation(); -} - -function debug(str) { - document.querySelector('#dbg').innerHTML = 'You chose the ' + str.toUpperCase() + ' option.'; -} diff --git a/examples/webkit/webkit-guide/js/anim_skew.js b/examples/webkit/webkit-guide/js/anim_skew.js deleted file mode 100644 index 8b1300fd1f..0000000000 --- a/examples/webkit/webkit-guide/js/anim_skew.js +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -var app = new Function(); - -app.init = function() { - app.elements = document.querySelectorAll('.items > div'); - app.navs = document.querySelectorAll('nav > div'); - - // elements - for ( var i = 0, ln = app.elements.length ; i < ln ; i++ ) { - app.elements[i].className = 'row' + (i + 1); - app.elements[i].addEventListener('click', app.remove); - } - - // navigation - for ( var i = 0, ln = app.navs.length ; i < ln ; i++ ) { - app.navs[i].addEventListener('click', app.filter ); - } -}; - -app.filter = function(event) { - var type = event.target.className; - - var hiddenCount = 0; - - if (! type ) { - app.init(); - return false; - } - - for ( var i = 0, ln = app.elements.length ; i < ln ; i++ ) { - if ( app.elements[i].title == type ) { - app.elements[i].className = 'row' + ((i + 1) - hiddenCount); - } - else { - app.elements[i].className = 'hide'; - hiddenCount++; - } - } -}; - -app.remove = function() { - event.currentTarget.className = 'hide'; - app.rearrange(); -}; - -app.rearrange = function() { - var hiddenCount = 0; - for ( var i = 0, ln = app.elements.length ; i < ln ; i++ ) { - if ( app.elements[i].className.match(/hide/) ) { - hiddenCount++; - } - else { - app.elements[i].className = 'row' + ((i + 1) - hiddenCount); - } - } -}; - -window.onload = function() { app.init() }; - diff --git a/examples/webkit/webkit-guide/js/css3_backgrounds.js b/examples/webkit/webkit-guide/js/css3_backgrounds.js deleted file mode 100644 index 29004c7b53..0000000000 --- a/examples/webkit/webkit-guide/js/css3_backgrounds.js +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -document.querySelector('body').addEventListener('click', function(event) { - var l = event.target; - if (l.tagName != 'DT') return false ; - if ( l.className ) { - l.className = ''; - } - else { - l.className = 'selected'; - } -}); diff --git a/examples/webkit/webkit-guide/js/css3_border-img.js b/examples/webkit/webkit-guide/js/css3_border-img.js deleted file mode 100644 index a8bfd9132d..0000000000 --- a/examples/webkit/webkit-guide/js/css3_border-img.js +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - var el = document.querySelectorAll('input'); - for (var i = 0, l = el.length ; i < l ; i++ ) { - } -} diff --git a/examples/webkit/webkit-guide/js/css3_grad-radial.js b/examples/webkit/webkit-guide/js/css3_grad-radial.js deleted file mode 100644 index f194ddaa6c..0000000000 --- a/examples/webkit/webkit-guide/js/css3_grad-radial.js +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - var el = document.querySelector('#main'); - el.addEventListener('mousedown', function(event){ - - var colors = [ 'beige', 'crimson', 'darkcyan', 'turquoise', - 'darkgoldenrod', 'darkorange', 'fuchsia', - 'greenyellow', 'lightblue', 'lightcoral', - 'lightgreen', 'mediumorchid', 'pink', 'plum', - 'skyblue', 'springgreen', 'tan', 'tomato', - 'violet', 'yellow', 'teal']; - - var x = event.offsetX; - var y = event.offsetY; - - var loc = document.querySelector('#localStyles'); - var style = '#main:active {' + 'background: -webkit-gradient(radial, '; - style += (x + ' '); - style += (y + ' '); - style += ',5,'; - style += ((x + 10) + ' '); - style += ((y + 10) + ' '); - style += ', 48, '; - style += 'from(' + colors[r(5)] + '),'; - style += 'color-stop(20%, ' + colors[r(5)] + '),'; - style += 'color-stop(40%, ' + colors[r(5)] + '),'; - style += 'color-stop(60%, ' + colors[r(5)] + '),'; - style += 'color-stop(80%, ' + colors[r(5)] + '),'; - style += 'to(#ffffff) );' - style += '}' - loc.innerHTML = style; - }); -} - -function r(i) { - return Math.floor( (Math.random() * i ) ); -} diff --git a/examples/webkit/webkit-guide/js/css3_mask-grad.js b/examples/webkit/webkit-guide/js/css3_mask-grad.js deleted file mode 100644 index 911212dcf4..0000000000 --- a/examples/webkit/webkit-guide/js/css3_mask-grad.js +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -document.querySelector('body').addEventListener('click', function(event) { - var l = event.target; - if (l.tagName != 'IMG') return false ; - event.target.className = 'select'; -}); diff --git a/examples/webkit/webkit-guide/js/css3_mask-img.js b/examples/webkit/webkit-guide/js/css3_mask-img.js deleted file mode 100644 index a8bfd9132d..0000000000 --- a/examples/webkit/webkit-guide/js/css3_mask-img.js +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - var el = document.querySelectorAll('input'); - for (var i = 0, l = el.length ; i < l ; i++ ) { - } -} diff --git a/examples/webkit/webkit-guide/js/css3_text-overflow.js b/examples/webkit/webkit-guide/js/css3_text-overflow.js deleted file mode 100644 index 58af80d6d1..0000000000 --- a/examples/webkit/webkit-guide/js/css3_text-overflow.js +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - var el = document.querySelectorAll('.accordion > li'); - for (var i = 0, l = el.length ; i < l ; i++ ) { - el[i].addEventListener('click', function(event){ - var tgt = event.target; - if ( tgt.tagName == 'LI' && ( ! tgt.className ) ) { - tgt.className = 'selected'; - } - if ( tgt.tagName == 'DIV' && ( tgt.className == 'dismiss') ) { - tgt.parentNode.className = ''; - } - - }); - } -} diff --git a/examples/webkit/webkit-guide/js/form_tapper.js b/examples/webkit/webkit-guide/js/form_tapper.js deleted file mode 100644 index d4d87a2c1a..0000000000 --- a/examples/webkit/webkit-guide/js/form_tapper.js +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - return false; - var el = document.querySelectorAll('input[type=radio]'); - for ( var i = 0, l = el.length ; i < l ; i++ ) { - el[i].addEventListener('click', resetRadio); - } -} - -function resetRadio(event) { - if (event.target._checked == true) { - event.target._checked = false; - event.target.checked = false; - event.target.indeterminate = true; - } - else { - event.target._checked = true; - } -} diff --git a/examples/webkit/webkit-guide/js/mob_condjs.js b/examples/webkit/webkit-guide/js/mob_condjs.js deleted file mode 100644 index 32bf550d20..0000000000 --- a/examples/webkit/webkit-guide/js/mob_condjs.js +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -window.onload = function() { - var msg = 'JavaScript thinks you are viewing this page with a '; - if ( isDesign('desktop') ) { - msg += 'full desktop browser'; - } - else if ( isDesign('touch') ) { - msg += 'touch-based mobile browser'; - } - else if ( isDesign('mobile') ) { - msg += 'non-touch mobile browser'; - } - else { - msg = window.styleMedia.matchMedium; - } - document.getElementById('js').innerHTML = msg; -}; - -function isDesign(str) { - var design; - if (matchesMedia('only screen and (min-device-width: 481px)')) { - design = 'desktop'; - } - else if (matchesMedia('only screen and (max-device-width: 480px)')) { - design = 'touch'; - } - else if (matchesMedia('handheld')) { - design = 'mobile'; - } - return str == design; -} - -function matchesMedia(query) { - if (!!window.matchMedia) - return window.matchMedia(query).matches; - if (!!window.styleMedia && !!window.styleMedia.matchMedium) - return window.styleMedia.matchMedium(query); - if (!!window.media && window.media.matchMedium) - return window.media.matchMedium(query); - return false; -} diff --git a/examples/webkit/webkit-guide/js/mobile.js b/examples/webkit/webkit-guide/js/mobile.js deleted file mode 100644 index 51c94d4080..0000000000 --- a/examples/webkit/webkit-guide/js/mobile.js +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -var app = new Function(); - -app.toggleDisplay = function(id) { - var el = document.getElementById(id); - if (el.className.match(/hidden/)) { - el.className = ''; - } - else { - el.className = 'hidden'; - } -} diff --git a/examples/webkit/webkit-guide/js/storage.js b/examples/webkit/webkit-guide/js/storage.js deleted file mode 100644 index b5a374f39d..0000000000 --- a/examples/webkit/webkit-guide/js/storage.js +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt WebKit module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -var app = new Function(); - -app.dbg = false; - -window.onload = function() { - - app.cred = document.querySelector('#cred'); - - // open form: - document.querySelector('#openform').addEventListener('mousedown', app.getInfo); - // dismiss form: - document.querySelector('#dismiss').addEventListener('mousedown', app.dismiss); - - // form validation: - app.inputs = document.querySelectorAll('input:not([type="submit"])'); - for (var i = 0, l = app.inputs.length ; i < l ; i++ ) { - app.inputs[i].addEventListener('blur', app.checkEdit); - } - - // storage - app.db_loc = window.localStorage; - app.db_ses = window.sessionStorage; - - if (!!app.db_loc) { - // no login info yet... - if ( !app.db_loc.getItem('login') || !app.db_loc.getItem('password') ) app.getInfo(); - } - else { - alert("This application needs to run on a recent WebKit-based browser."); - } - -}; - -app.hint = function(str) { - document.querySelector('body').className = str; -}; - -app.checkEdit = function(ev) { - ev.currentTarget.className = 'validate'; -} - -app.getInfo = function(ev) { - app.cred.className = 'show'; - app.inputs[0].value = app.db_loc.getItem('login'); - app.inputs[1].value = app.db_loc.getItem('password'); - app.inputs[2].value = app.db_ses.getItem('credit'); -} - -app.dismiss = function(ev) { - app.db_loc.setItem('login', app.inputs[0].value); - app.db_loc.setItem('password', app.inputs[1].value); - app.db_ses.setItem('credit', app.inputs[2].value); - ev.currentTarget.parentNode.className = 'hide'; -} - diff --git a/examples/webkit/webkit-guide/layout_link-fmt.htm b/examples/webkit/webkit-guide/layout_link-fmt.htm deleted file mode 100644 index bcb6228a32..0000000000 --- a/examples/webkit/webkit-guide/layout_link-fmt.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - -Link Context Hints - - - - -

     

    - - - diff --git a/examples/webkit/webkit-guide/layout_tbl-keyhole.htm b/examples/webkit/webkit-guide/layout_tbl-keyhole.htm deleted file mode 100644 index 58d1ebd6d4..0000000000 --- a/examples/webkit/webkit-guide/layout_tbl-keyhole.htm +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -Mobilized Tables - - - -
    - -
    - -

    Mobilized Tables

    - -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec -feugiat gravida viverra. Vivamus ipsum felis, cursus sed venenatis -nec, tempus ac tellus.

    - -

    View Listings

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ItemPriceLocationPostedDescription
    Keiser Indoor Cycling Bike / Platform$250Santa Monica, CA4 days agoExcepteur sint occaecat cupidatat non proident, sunt in culpa qui -officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit -amet, consectetur adipiscing elit. Donec feugiat gravida viverra. -Vivamus ipsum felis, cursus sed venenatis nec, tempus ac tellus.
    Ladies Diamondback Mountain Bike$300North Hollywood, CA3 hours agoDuis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Donec feugiat gravida viverra. Vivamus -ipsum felis, cursus sed venenatis nec, tempus ac tellus.
    AA Cycle 10 Speed Road Bike$150Burbank, CA2 days agoUt enim ad minim veniam, quis nostrud exercitation ullamco laboris -nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, -consectetur adipiscing elit. Donec feugiat gravida viverra. Vivamus -ipsum felis, cursus sed venenatis nec, tempus ac tellus.
    Magna Dual Suspection Mountain Bike 24$60El Segundo, CA2 weeks agoLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do -eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem -ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat -gravida viverra. Vivamus ipsum felis, cursus sed venenatis nec, tempus -ac tellus.
    - -

    -Text continues here. Donec a massa felis, a congue purus. Nullam et -turpis diam. Aenean vestibulum egestas metus, eu sodales dolor -venenatis quis. Aenean augue orci, facilisis et convallis ut, egestas -at neque. -

    -
    - - - -
    - - - diff --git a/examples/webkit/webkit-guide/mob_condjs.htm b/examples/webkit/webkit-guide/mob_condjs.htm deleted file mode 100644 index 1cc4a9da00..0000000000 --- a/examples/webkit/webkit-guide/mob_condjs.htm +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - -Media Queries + JavaScript - - - - - - -
    -
    -

    Media Queries + JavaScript

    -

    ...

    - -

    ...

    - -
    -
    - - - - - - diff --git a/examples/webkit/webkit-guide/mob_layout.htm b/examples/webkit/webkit-guide/mob_layout.htm deleted file mode 100644 index 1bd74800a2..0000000000 --- a/examples/webkit/webkit-guide/mob_layout.htm +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -Media Query-Driven Layout - -media-driven layout - - - - - -
    HEADER
    - -
    MAIN CONTENT
    - -
    FOOTER
    - - - - diff --git a/examples/webkit/webkit-guide/mob_mediaquery.htm b/examples/webkit/webkit-guide/mob_mediaquery.htm deleted file mode 100644 index 222884f874..0000000000 --- a/examples/webkit/webkit-guide/mob_mediaquery.htm +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - -Media Queries - - - - - - -
    -
    -

    Media Queries

    -

    ...

    -
    -
    - - - diff --git a/examples/webkit/webkit-guide/storage.htm b/examples/webkit/webkit-guide/storage.htm deleted file mode 100644 index 5982a621fe..0000000000 --- a/examples/webkit/webkit-guide/storage.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - -Local/Session Storage - - - -

    - -Local/Session Storage

    - -
    - - - -
    login
    - -
    - -
    password
    - - -
    credit card
    - - -
    - - - - - diff --git a/examples/webkit/webkit-guide/webkit-guide.pro b/examples/webkit/webkit-guide/webkit-guide.pro deleted file mode 100644 index a2c2dd4a20..0000000000 --- a/examples/webkit/webkit-guide/webkit-guide.pro +++ /dev/null @@ -1,256 +0,0 @@ -#A simple .pro file to make Qt aware of the webkit-guide files. -#For documentation generation -#TEMPLATE += subdirs - -SOURCES = anim_accord.htm \ -anim_demo-rotate.htm \ -anim_demo-scale.htm \ -anim_demo-skew.htm \ -anim_gallery.htm \ -anim_panel.htm \ -anim_pulse.htm \ -anim_skew.htm \ -anim_slide1.htm \ -anim_slide2.htm \ -anim_slide3.htm \ -anim_tabbedSkew.htm \ -_copyright.txt \ -css3_backgrounds.htm \ -css3_border-img.htm \ -css3_gradientBack.htm \ -css3_gradientBackStop.htm \ -css3_gradientButton.htm \ -css3_grad-radial.htm \ -css3_mask-grad.htm \ -css3_mask-img.htm \ -css3_multicol.htm \ -css3_reflect.htm \ -css3_scroll.htm \ -css3_sel-nth.htm \ -css3_shadow.htm \ -css3_text-overflow.htm \ -css3_text-shadow.htm \ -css3_text-stroke.htm \ -form_tapper.htm \ -form_toggler.htm \ -_image_assets.htm \ -_index.html \ -layout_link-fmt.htm \ -layout_tbl-keyhole.htm \ -mob_condjs.htm \ -mob_layout.htm \ -mob_mediaquery.htm \ -storage.htm \ -css/anim_accord.css \ -css/anim_demo-rotate.css \ -css/anim_demo-scale.css \ -css/anim_demo-skew.css \ -css/anim_gallery.css \ -css/anim_panel.css \ -css/anim_pulse.css \ -css/anim_skew.css \ -css/anim_slide.css \ -css/anim_tabbedSkew.css \ -css/css3_backgrounds.css \ -css/css3_border-img.css \ -css/css3_gradientBack.css \ -css/css3_gradientBackStop.css \ -css/css3_gradientButton.css \ -css/css3_grad-radial.css \ -css/css3_mask-grad.css \ -css/css3_mask-img.css \ -css/css3_multicol.css \ -css/css3_reflect.css \ -css/css3_scroll.css \ -css/css3_sel-nth.css \ -css/css3_shadowBlur.css \ -css/css3_shadow.css \ -css/css3_text-overflow.css \ -css/css3_text-shadow.css \ -css/css3_text-stroke.css \ -css/form_tapper.css \ -css/form_toggler.css \ -css/layout_link-fmt.css \ -css/layout_tbl-keyhole.css \ -css/mob_condjs.css \ -css/mobile.css \ -css/mob_mediaquery.css \ -css/mq_desktop.css \ -css/mqlayout_desktop.css \ -css/mqlayout_mobile.css \ -css/mqlayout_touch.css \ -css/mq_mobile.css \ -css/mq_touch.css \ -css/storage.css \ -img/border-frame.png \ -img/gal1.jpg \ -img/gal2.jpg \ -img/gal3.jpg \ -img/gal4.jpg \ -img/gal5.jpg \ -img/gal6.jpg \ -img/gal7.jpg \ -img/gal8.jpg \ -img/gradient.jpg \ -img/gray_icon_close.png \ -img/ic_ag_016.png \ -img/ic_ag_032.png \ -img/ic_ag_036.png \ -img/ic_ag_048.png \ -img/ic_al_016.png \ -img/ic_al_032.png \ -img/ic_al_036.png \ -img/ic_al_048.png \ -img/ic_ar_016.png \ -img/ic_ar_032.png \ -img/ic_ar_036.png \ -img/ic_ar_048.png \ -img/ic_b_016.png \ -img/ic_b_032.png \ -img/ic_b_036.png \ -img/ic_b_048.png \ -img/ic_be_016.png \ -img/ic_be_032.png \ -img/ic_be_036.png \ -img/ic_be_048.png \ -img/ic_c_016.png \ -img/ic_c_032.png \ -img/ic_c_036.png \ -img/ic_c_048.png \ -img/ic_ca_016.png \ -img/ic_ca_032.png \ -img/ic_ca_036.png \ -img/ic_ca_048.png \ -img/ic_cl_016.png \ -img/ic_cl_032.png \ -img/ic_cl_036.png \ -img/ic_cl_048.png \ -img/ic_cu_016.png \ -img/ic_cu_032.png \ -img/ic_cu_036.png \ -img/ic_cu_048.png \ -img/ic_f_016.png \ -img/ic_f_032.png \ -img/ic_f_036.png \ -img/ic_f_048.png \ -img/ic_fe_016.png \ -img/ic_fe_032.png \ -img/ic_fe_036.png \ -img/ic_fe_048.png \ -img/ic_h_016.png \ -img/ic_h_032.png \ -img/ic_h_036.png \ -img/ic_h_048.png \ -img/ic_he_016.png \ -img/ic_he_032.png \ -img/ic_he_036.png \ -img/ic_he_048.png \ -img/ic_k_016.png \ -img/ic_k_032.png \ -img/ic_k_036.png \ -img/ic_k_048.png \ -img/ic_li_016.png \ -img/ic_li_032.png \ -img/ic_li_036.png \ -img/ic_li_048.png \ -img/ic_mg_016.png \ -img/ic_mg_032.png \ -img/ic_mg_036.png \ -img/ic_mg_048.png \ -img/ic_n_016.png \ -img/ic_n_032.png \ -img/ic_n_036.png \ -img/ic_n_048.png \ -img/ic_na_016.png \ -img/ic_na_032.png \ -img/ic_na_036.png \ -img/ic_na_048.png \ -img/ic_ne_016.png \ -img/ic_ne_032.png \ -img/ic_ne_036.png \ -img/ic_ne_048.png \ -img/ic_ni_016.png \ -img/ic_ni_032.png \ -img/ic_ni_036.png \ -img/ic_ni_048.png \ -img/ic_o_016.png \ -img/ic_o_032.png \ -img/ic_o_036.png \ -img/ic_o_048.png \ -img/icon_check.png \ -img/icon_check_x24green.png \ -img/icon_dismiss.png \ -img/icon_dismiss_x22.png \ -img/icon_drill-down.png \ -img/icon_drill-down_x32.png \ -img/icon_drill-up.png \ -img/icon_drill-up_x32.png \ -img/icon_expand-nav.png \ -img/icon_head-collapsed.png \ -img/icon_head-collapsed_x13.png \ -img/icon_head-expanded.png \ -img/icon_head-expanded_x13.png \ -img/icon_info.png \ -img/icon_info_x24.png \ -img/icon_link-doc.png \ -img/icon_link-email.png \ -img/icon_link-external.png \ -img/icon_link-pdf.png \ -img/icon_link-ppt.png \ -img/icon_link-rss.png \ -img/icon_link-sms.png \ -img/icon_link-tel.png \ -img/icon_link-xls.png \ -img/icon_list-all_circ.png \ -img/icon_list-all.png \ -img/icon_nav_end.png \ -img/icon_nav-start.png \ -img/icon_nav-top.png \ -img/icon_nav-up.png \ -img/icon_question.png \ -img/icon_scroll-left.png \ -img/icon_scroll-right.png \ -img/icon_trash.png \ -img/ic_pt_016.png \ -img/ic_pt_032.png \ -img/ic_pt_036.png \ -img/ic_pt_048.png \ -img/ic_si_016.png \ -img/ic_si_032.png \ -img/ic_si_036.png \ -img/ic_si_048.png \ -img/ic_zn_016.png \ -img/ic_zn_032.png \ -img/ic_zn_036.png \ -img/ic_zn_048.png \ -img/land1.jpg \ -img/land2.jpg \ -img/land3.jpg \ -img/land4.jpg \ -img/land5.jpg \ -img/land6.jpg \ -img/land7.jpg \ -img/land8.jpg \ -img/mask.png \ -img/tnail_gal1.png \ -img/tnail_gal2.png \ -img/tnail_gal3.png \ -img/tnail_gal4.png \ -img/tnail_gal5.png \ -img/tnail_gal6.png \ -img/tnail_gal7.png \ -img/tnail_gal8.png \ -js/anim_accord.js \ -js/anim_gallery.js \ -js/anim_panel.js \ -js/anim_skew.js \ -js/css3_backgrounds.js \ -js/css3_border-img.js \ -js/css3_grad-radial.js \ -js/css3_mask-grad.js \ -js/css3_mask-img.js \ -js/css3_text-overflow.js \ -js/form_tapper.js \ -js/mob_condjs.js \ -js/mobile.js \ -js/storage.js \ -- cgit v1.2.3 From 2e3ebcd1d4d04dece0ac0427afae4cce7c417926 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 16 Oct 2015 07:36:59 +0200 Subject: Don't crash when QOpenGLPaintDevice is created without context. Change-Id: Ic826158a1570ec49e9847cf040ce897a682048db Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglpaintengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index a9a4adaddc..4836dde343 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -2076,7 +2076,7 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev) d->device->ensureActiveTarget(); - if (d->device->context() != QOpenGLContext::currentContext()) { + if (d->device->context() != QOpenGLContext::currentContext() || !d->device->context()) { qWarning("QPainter::begin(): QOpenGLPaintDevice's context needs to be current"); return false; } -- cgit v1.2.3 From 3cae29b746df804ddfa37a3e27b48bd89686d2c1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 19 Oct 2015 10:34:42 +0200 Subject: Windows: Open GL blacklist - Disable GMA 3150 The card cannot handle Desktop GL nor ANGLE. Task-number: QTBUG-43243 Change-Id: I5a349be1b09f1ef2decd36bef87a90b230ca2c04 Reviewed-by: Laszlo Agocs --- .../platforms/windows/openglblacklists/default.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/openglblacklists/default.json b/src/plugins/platforms/windows/openglblacklists/default.json index f1500409fe..5d8bd56a1e 100644 --- a/src/plugins/platforms/windows/openglblacklists/default.json +++ b/src/plugins/platforms/windows/openglblacklists/default.json @@ -54,6 +54,18 @@ "features": [ "disable_desktopgl" ] - } + }, + { + "id": 5, + "description": "Intel GMA 3150 crashes (QTBUG-43243)", + "vendor_id": "0x8086", + "device_id": [ "0xA001", "0xA011" ], + "os": { + "type": "win" + }, + "features": [ + "disable_desktopgl", "disable_angle" + ] + } ] } -- cgit v1.2.3 From 59b860450fef906d72d6a343190ba2d45383aba6 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Fri, 16 Oct 2015 01:36:16 +0300 Subject: Polish the complexpingpong example - Use QDBusServiceWatcher to detect that pong service became available (QDBusConnectionInterface::serviceOwnerChanged() signal is deprecated). - Use new connection syntax. Task-number: QTBUG-28082 Change-Id: I7b93b961ee6d45aaeefab77fa1d1943e38b4a4c0 Reviewed-by: Friedemann Kleint --- examples/dbus/complexpingpong/complexping.cpp | 14 +++++++------- examples/dbus/complexpingpong/complexping.h | 2 +- examples/dbus/complexpingpong/complexpong.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/dbus/complexpingpong/complexping.cpp b/examples/dbus/complexpingpong/complexping.cpp index 10318fb0ed..855ef5d394 100644 --- a/examples/dbus/complexpingpong/complexping.cpp +++ b/examples/dbus/complexpingpong/complexping.cpp @@ -49,11 +49,9 @@ #include "ping-common.h" #include "complexping.h" -void Ping::start(const QString &name, const QString &oldValue, const QString &newValue) +void Ping::start(const QString &name) { - Q_UNUSED(oldValue); - - if (name != SERVICE_NAME || newValue.isEmpty()) + if (name != SERVICE_NAME) return; // open stdin for reading @@ -105,10 +103,12 @@ int main(int argc, char **argv) return 1; } + QDBusServiceWatcher serviceWatcher(SERVICE_NAME, QDBusConnection::sessionBus(), + QDBusServiceWatcher::WatchForRegistration); + Ping ping; - ping.connect(QDBusConnection::sessionBus().interface(), - SIGNAL(serviceOwnerChanged(QString,QString,QString)), - SLOT(start(QString,QString,QString))); + QObject::connect(&serviceWatcher, &QDBusServiceWatcher::serviceRegistered, + &ping, &Ping::start); QProcess pong; pong.start("./complexpong"); diff --git a/examples/dbus/complexpingpong/complexping.h b/examples/dbus/complexpingpong/complexping.h index 4eb571dd2f..f6f1505507 100644 --- a/examples/dbus/complexpingpong/complexping.h +++ b/examples/dbus/complexpingpong/complexping.h @@ -49,7 +49,7 @@ class Ping: public QObject { Q_OBJECT public slots: - void start(const QString &, const QString &, const QString &); + void start(const QString &); public: QFile qstdin; QDBusInterface *iface; diff --git a/examples/dbus/complexpingpong/complexpong.cpp b/examples/dbus/complexpingpong/complexpong.cpp index 0e0d5fed76..682e301f12 100644 --- a/examples/dbus/complexpingpong/complexpong.cpp +++ b/examples/dbus/complexpingpong/complexpong.cpp @@ -61,7 +61,7 @@ void Pong::setValue(const QString &newValue) void Pong::quit() { - QTimer::singleShot(0, QCoreApplication::instance(), SLOT(quit())); + QTimer::singleShot(0, QCoreApplication::instance(), &QCoreApplication::quit); } QDBusVariant Pong::query(const QString &query) @@ -88,7 +88,7 @@ int main(int argc, char **argv) QObject obj; Pong *pong = new Pong(&obj); - pong->connect(&app, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit())); + QObject::connect(&app, &QCoreApplication::aboutToQuit, pong, &Pong::aboutToQuit); pong->setProperty("value", "initial value"); QDBusConnection::sessionBus().registerObject("/", &obj); -- cgit v1.2.3 From 9636d8bee055e03417d97a9f4f58d7074a753737 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Fri, 16 Oct 2015 12:44:59 +0300 Subject: Add header template for commercial only modules We need to add header template for commercial only modules in the upstream now when we are using same ci system for building and testing all. Without this tst_licenses.pl will fail in coin for those commercial only modules Change-Id: Ifb8170818b3b730b10e920012757af42442f0edc Reviewed-by: Iikka Eklund Reviewed-by: Sami Makkonen Reviewed-by: Frederik Gladhorn --- header.COMM | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 header.COMM diff --git a/header.COMM b/header.COMM new file mode 100644 index 0000000000..1c8cb00e73 --- /dev/null +++ b/header.COMM @@ -0,0 +1,20 @@ +/****************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ -- cgit v1.2.3 From e56938b4bb244dfccdb78aed66c842d65fe64c14 Mon Sep 17 00:00:00 2001 From: Dan Cape Date: Tue, 6 Oct 2015 14:00:15 -0400 Subject: QLineEdit: Unable to drag selected text when aligned right or center Created local inSelection function to modify the x value (similar to xToPos()) before sending it to the control. Ran the QLineEdit test and manually tested with AlignLeft, AlignRight and AlignCenter. Change-Id: I088430580dc87f3cfff90c4cd9ff90e6ab215f57 Task-number: QTBUG-48495 Reviewed-by: Friedemann Kleint Reviewed-by: Giuseppe D'Angelo --- src/widgets/widgets/qlineedit.cpp | 2 +- src/widgets/widgets/qlineedit_p.cpp | 6 ++++++ src/widgets/widgets/qlineedit_p.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 32502fca09..6b32665065 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1488,7 +1488,7 @@ void QLineEdit::mousePressEvent(QMouseEvent* e) int cursor = d->xToPos(e->pos().x()); #ifndef QT_NO_DRAGANDDROP if (!mark && d->dragEnabled && d->control->echoMode() == Normal && - e->button() == Qt::LeftButton && d->control->inSelection(e->pos().x())) { + e->button() == Qt::LeftButton && d->inSelection(e->pos().x())) { if (!d->dndTimer.isActive()) d->dndTimer.start(QApplication::startDragTime(), this); } else diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index a68f5a41ed..e6dd4b8f3b 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -70,6 +70,12 @@ int QLineEditPrivate::xToPos(int x, QTextLine::CursorPosition betweenOrOn) const return control->xToPos(x, betweenOrOn); } +bool QLineEditPrivate::inSelection(int x) const +{ + x -= adjustedContentsRect().x() - hscroll + horizontalMargin; + return control->inSelection(x); +} + QRect QLineEditPrivate::cursorRect() const { return adjustedControlRect(control->cursorRect()); diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h index b47866b827..60372ab393 100644 --- a/src/widgets/widgets/qlineedit_p.h +++ b/src/widgets/widgets/qlineedit_p.h @@ -139,6 +139,7 @@ public: QRect adjustedControlRect(const QRect &) const; int xToPos(int x, QTextLine::CursorPosition = QTextLine::CursorBetweenCharacters) const; + bool inSelection(int x) const; QRect cursorRect() const; void setCursorVisible(bool visible); -- cgit v1.2.3 From 2042a091a3e88a77d52b6cdb62f3fc9153d7f5d7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 2 Oct 2015 14:39:23 +0200 Subject: QAbstractItemView::sizeHintForRow()/Column: Check for null delegate. The delegate may be null in QHeaderView. Task-number: QTBUG-48543 Change-Id: I4d3ba104b0b57431e8765271dc2dc880be096672 Reviewed-by: Giuseppe D'Angelo --- src/widgets/itemviews/qabstractitemview.cpp | 8 ++++---- tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index c5601b63b2..3bb4d0624f 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -3020,8 +3020,8 @@ int QAbstractItemView::sizeHintForRow(int row) const const QModelIndex index = d->model->index(row, c, d->root); if (QWidget *editor = d->editorForIndex(index).widget.data()) height = qMax(height, editor->height()); - int hint = d->delegateForIndex(index)->sizeHint(option, index).height(); - height = qMax(height, hint); + if (const QAbstractItemDelegate *delegate = d->delegateForIndex(index)) + height = qMax(height, delegate->sizeHint(option, index).height()); } return height; } @@ -3050,8 +3050,8 @@ int QAbstractItemView::sizeHintForColumn(int column) const const QModelIndex index = d->model->index(r, column, d->root); if (QWidget *editor = d->editorForIndex(index).widget.data()) width = qMax(width, editor->sizeHint().width()); - int hint = d->delegateForIndex(index)->sizeHint(option, index).width(); - width = qMax(width, hint); + if (const QAbstractItemDelegate *delegate = d->delegateForIndex(index)) + width = qMax(width, delegate->sizeHint(option, index).width()); } return width; } diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp index 7e73c19539..55fcf04846 100644 --- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp +++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp @@ -239,6 +239,8 @@ private slots: void testStreamWithHide(); void testStylePosition(); + void sizeHintCrash(); + protected: void setupTestData(bool use_reset_model = false); void additionalInit(); @@ -2879,5 +2881,15 @@ void tst_QHeaderView::testStylePosition() QCOMPARE(proxy.lastPosition, QStyleOptionHeader::OnlyOneSection); } +void tst_QHeaderView::sizeHintCrash() +{ + QTreeView treeView; + QStandardItemModel *model = new QStandardItemModel(&treeView); + model->appendRow(new QStandardItem("QTBUG-48543")); + treeView.setModel(model); + treeView.header()->sizeHintForColumn(0); + treeView.header()->sizeHintForRow(0); +} + QTEST_MAIN(tst_QHeaderView) #include "tst_qheaderview.moc" -- cgit v1.2.3 From c977c687cbfed64fac4a1550733d111a3d8cdca0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 8 Oct 2015 17:14:57 +0200 Subject: QMdiSubWindow: Do not close when doubleclicking on disabled Restore action. Check whether the action under the mouse is enabled before closing. Task-number: QTBUG-48493 Change-Id: I2a0669840b9b6c81dacdf179325301c02f1c0c35 Reviewed-by: Giuseppe D'Angelo --- src/widgets/widgets/qmdisubwindow.cpp | 5 ++++- .../widgets/qmdisubwindow/tst_qmdisubwindow.cpp | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index c3b31ea5a4..14aeb73baf 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -2689,7 +2689,10 @@ bool QMdiSubWindow::eventFilter(QObject *object, QEvent *event) // System menu events. if (d->systemMenu && d->systemMenu == object) { if (event->type() == QEvent::MouseButtonDblClick) { - close(); + const QMouseEvent *mouseEvent = static_cast(event); + const QAction *action = d->systemMenu->actionAt(mouseEvent->pos()); + if (!action || action->isEnabled()) + close(); } else if (event->type() == QEvent::MouseMove) { QMouseEvent *mouseEvent = static_cast(event); d->hoveredSubControl = d->getSubControl(mapFromGlobal(mouseEvent->globalPos())); diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index a6caa3d020..db252347ac 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -191,6 +191,7 @@ private slots: void fixedMinMaxSize(); #if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE) void replaceMenuBarWhileMaximized(); + void closeOnDoubleClick_data(); void closeOnDoubleClick(); #endif void setFont(); @@ -1793,9 +1794,23 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized() QVERIFY(!subWindow->maximizedSystemMenuIconWidget()); } +void tst_QMdiSubWindow::closeOnDoubleClick_data() +{ + QTest::addColumn("actionIndex"); + QTest::addColumn("expectClosed"); + + QTest::newRow("close") << 1 << true; + QTest::newRow("disabled-restore-action") << 0 << false; // QTBUG-48493 +} + void tst_QMdiSubWindow::closeOnDoubleClick() { + QFETCH(int, actionIndex); + QFETCH(bool, expectClosed); + QMdiArea mdiArea; + mdiArea.setWindowTitle(QLatin1String(QTest::currentTestFunction()) + + QLatin1Char(' ') + QLatin1String(QTest::currentDataTag())); QPointer subWindow = mdiArea.addSubWindow(new QWidget); mdiArea.show(); QVERIFY(QTest::qWaitForWindowExposed(&mdiArea)); @@ -1807,12 +1822,13 @@ void tst_QMdiSubWindow::closeOnDoubleClick() QVERIFY(systemMenu); QVERIFY(systemMenu->isVisible()); - sendMouseDoubleClick(systemMenu, QPoint(10, 10)); + const QRect actionGeometry = systemMenu->actionGeometry(systemMenu->actions().at(actionIndex)); + sendMouseDoubleClick(systemMenu, actionGeometry.center()); if (qApp->activePopupWidget() == static_cast(systemMenu)) systemMenu->hide(); qApp->processEvents(); - QVERIFY(!subWindow || !subWindow->isVisible()); QVERIFY(!systemMenu || !systemMenu->isVisible()); + QCOMPARE(subWindow.isNull() || !subWindow->isVisible(), expectClosed); } #endif -- cgit v1.2.3 From 948e88dab22bfbe243f0fd0642d76fbdec474477 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 19 Oct 2015 12:41:35 +0200 Subject: QMimeBinaryProvider::loadMimeTypePrivate(): avoid an unneeded QStringRef -> QString conversion Change-Id: Id6baae4b710fd9aa8bdc4721dbe64e2d881163bb Reviewed-by: Friedemann Kleint Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/mimetypes/qmimeprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp index a8a1331053..ebaa1b069c 100644 --- a/src/corelib/mimetypes/qmimeprovider.cpp +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -591,7 +591,7 @@ void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data) if (xml.name() != QLatin1String("mime-type")) { continue; } - const QString name = xml.attributes().value(QLatin1String("type")).toString(); + const QStringRef name = xml.attributes().value(QLatin1String("type")); if (name.isEmpty()) continue; if (name != data.name) { -- cgit v1.2.3 From 037ba8d7afb6a4b5191918a7ddf182cc25c7b16f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 19 Oct 2015 00:14:56 +0200 Subject: QGestureManager: use qEnvironmentVariableIntValue() It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I863593166db8eff4c4466996110f5cfdb758ec00 Reviewed-by: Friedemann Kleint Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/kernel/qgesturemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp index 9a35308cad..fb2914d53a 100644 --- a/src/widgets/kernel/qgesturemanager.cpp +++ b/src/widgets/kernel/qgesturemanager.cpp @@ -66,7 +66,7 @@ static inline int panTouchPoints() static const char panTouchPointVariable[] = "QT_PAN_TOUCHPOINTS"; if (qEnvironmentVariableIsSet(panTouchPointVariable)) { bool ok; - const int result = qgetenv(panTouchPointVariable).toInt(&ok); + const int result = qEnvironmentVariableIntValue(panTouchPointVariable, &ok); if (ok && result >= 1) return result; qWarning() << "Ignoring invalid value of " << panTouchPointVariable; -- cgit v1.2.3 From 6ea67f52dab17267805410d7d2ce3950210c7b9c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 19 Oct 2015 15:51:22 +0200 Subject: Image viewer example: Fix broken error message formatting. Task-number: QTBUG-48851 Change-Id: Ie86bcc498c9dc1f9754192a256a28fa467f6dbc9 Reviewed-by: Shawn Rutledge --- examples/widgets/widgets/imageviewer/imageviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/widgets/imageviewer/imageviewer.cpp b/examples/widgets/widgets/imageviewer/imageviewer.cpp index a4b37060f6..844acbd62f 100644 --- a/examples/widgets/widgets/imageviewer/imageviewer.cpp +++ b/examples/widgets/widgets/imageviewer/imageviewer.cpp @@ -76,7 +76,7 @@ bool ImageViewer::loadFile(const QString &fileName) if (newImage.isNull()) { QMessageBox::information(this, QGuiApplication::applicationDisplayName(), tr("Cannot load %1: %2") - .arg(QDir::toNativeSeparators(fileName)), reader.errorString()); + .arg(QDir::toNativeSeparators(fileName), reader.errorString())); return false; } //! [2] -- cgit v1.2.3 From c9195ab36de6cdc124826edfab3739060bf4d8cc Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Mon, 19 Oct 2015 10:03:38 -0200 Subject: TextEdit example: fix build when clipboard is disabled. Change-Id: Ib25563e3dc299dc2d23bed8b3071af1ba81150e7 Reviewed-by: Friedemann Kleint --- examples/widgets/richtext/textedit/textedit.cpp | 4 ++-- examples/widgets/richtext/textedit/textedit.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 201151c32e..be46c4d008 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -115,10 +115,10 @@ TextEdit::TextEdit(QWidget *parent) actionUndo->setEnabled(textEdit->document()->isUndoAvailable()); actionRedo->setEnabled(textEdit->document()->isRedoAvailable()); +#ifndef QT_NO_CLIPBOARD actionCut->setEnabled(false); actionCopy->setEnabled(false); -#ifndef QT_NO_CLIPBOARD connect(QApplication::clipboard(), &QClipboard::dataChanged, this, &TextEdit::clipboardDataChanged); #endif @@ -202,6 +202,7 @@ void TextEdit::setupEditActions() tb->addAction(actionRedo); menu->addSeparator(); +#ifndef QT_NO_CLIPBOARD const QIcon cutIcon = QIcon::fromTheme("edit-cut", QIcon(rsrcPath + "/editcut.png")); actionCut = menu->addAction(cutIcon, tr("Cu&t"), textEdit, &QTextEdit::cut); actionCut->setPriority(QAction::LowPriority); @@ -219,7 +220,6 @@ void TextEdit::setupEditActions() actionPaste->setPriority(QAction::LowPriority); actionPaste->setShortcut(QKeySequence::Paste); tb->addAction(actionPaste); -#ifndef QT_NO_CLIPBOARD if (const QMimeData *md = QApplication::clipboard()->mimeData()) actionPaste->setEnabled(md->hasText()); #endif diff --git a/examples/widgets/richtext/textedit/textedit.h b/examples/widgets/richtext/textedit/textedit.h index b338493d83..ca2fb86b29 100644 --- a/examples/widgets/richtext/textedit/textedit.h +++ b/examples/widgets/richtext/textedit/textedit.h @@ -110,9 +110,11 @@ private: QAction *actionAlignJustify; QAction *actionUndo; QAction *actionRedo; +#ifndef QT_NO_CLIPBOARD QAction *actionCut; QAction *actionCopy; QAction *actionPaste; +#endif QComboBox *comboStyle; QFontComboBox *comboFont; -- cgit v1.2.3 From 85226dfed3332755d6cabadcc1e65d23e98ce1f8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 18 Oct 2015 15:50:05 +0200 Subject: QLatin1String: add test QLatin1String wasn't really tested except as a drive-by. Unearthed a discrepancy with docs. Fixed the docs. Change-Id: I1246bb33888132edbc4e22da792a480a156357bf Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/tools/qstring.cpp | 6 +- tests/auto/corelib/tools/qlatin1string/.gitignore | 1 + .../corelib/tools/qlatin1string/qlatin1string.pro | 8 ++ .../tools/qlatin1string/tst_qlatin1string.cpp | 116 +++++++++++++++++++++ tests/auto/corelib/tools/tools.pro | 1 + 5 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 tests/auto/corelib/tools/qlatin1string/.gitignore create mode 100644 tests/auto/corelib/tools/qlatin1string/qlatin1string.pro create mode 100644 tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index ea220ed557..38b5dcfe1f 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -8227,9 +8227,7 @@ QString &QString::setRawData(const QChar *unicode, int size) /*! \fn QLatin1String::QLatin1String(const char *str) - Constructs a QLatin1String object that stores \a str. Note that if - \a str is 0, an empty string is created; this case is handled by - QString. + Constructs a QLatin1String object that stores \a str. The string data is \e not copied. The caller must be able to guarantee that \a str will not be deleted or modified as long as @@ -8241,8 +8239,6 @@ QString &QString::setRawData(const QChar *unicode, int size) /*! \fn QLatin1String::QLatin1String(const char *str, int size) Constructs a QLatin1String object that stores \a str with \a size. - Note that if \a str is 0, an empty string is created; this case - is handled by QString. The string data is \e not copied. The caller must be able to guarantee that \a str will not be deleted or modified as long as diff --git a/tests/auto/corelib/tools/qlatin1string/.gitignore b/tests/auto/corelib/tools/qlatin1string/.gitignore new file mode 100644 index 0000000000..dddf56b2df --- /dev/null +++ b/tests/auto/corelib/tools/qlatin1string/.gitignore @@ -0,0 +1 @@ +tst_qlatin1string diff --git a/tests/auto/corelib/tools/qlatin1string/qlatin1string.pro b/tests/auto/corelib/tools/qlatin1string/qlatin1string.pro new file mode 100644 index 0000000000..219afa661b --- /dev/null +++ b/tests/auto/corelib/tools/qlatin1string/qlatin1string.pro @@ -0,0 +1,8 @@ +CONFIG += testcase parallel_test +TARGET = tst_qlatin1string +QT = core testlib +SOURCES = tst_qlatin1string.cpp +DEFINES += QT_NO_CAST_TO_ASCII +contains(QT_CONFIG,c++11): CONFIG += c++11 c++14 + +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp new file mode 100644 index 0000000000..5b83fe1958 --- /dev/null +++ b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include + +class tst_QLatin1String : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void nullString(); + void emptyString(); +}; + +void tst_QLatin1String::nullString() +{ + // from nullptr + { + const char *null = Q_NULLPTR; + QLatin1String l1(null); + QCOMPARE(static_cast(l1.data()), static_cast(Q_NULLPTR)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isNull()); + } + + // from null QByteArray + { + const QByteArray null; + QVERIFY(null.isNull()); + + QLatin1String l1(null); + QEXPECT_FAIL("", "null QByteArrays become non-null QLatin1Strings...", Continue); + QCOMPARE(static_cast(l1.data()), static_cast(Q_NULLPTR)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QEXPECT_FAIL("", "null QByteArrays become non-null QLatin1Strings become non-null QStrings...", Continue); + QVERIFY(s.isNull()); + } +} + +void tst_QLatin1String::emptyString() +{ + { + const char *empty = ""; + QLatin1String l1(empty); + QCOMPARE(static_cast(l1.data()), static_cast(empty)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isEmpty()); + QVERIFY(!s.isNull()); + } + + { + const char *notEmpty = "foo"; + QLatin1String l1(notEmpty, 0); + QCOMPARE(static_cast(l1.data()), static_cast(notEmpty)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isEmpty()); + QVERIFY(!s.isNull()); + } + + { + const QByteArray empty = ""; + QLatin1String l1(empty); + QCOMPARE(static_cast(l1.data()), static_cast(empty.constData())); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isEmpty()); + QVERIFY(!s.isNull()); + } +} + + + +QTEST_APPLESS_MAIN(tst_QLatin1String) + +#include "tst_qlatin1string.moc" diff --git a/tests/auto/corelib/tools/tools.pro b/tests/auto/corelib/tools/tools.pro index 9024a1a1bb..f9e1c454e7 100644 --- a/tests/auto/corelib/tools/tools.pro +++ b/tests/auto/corelib/tools/tools.pro @@ -24,6 +24,7 @@ SUBDIRS=\ qhash \ qhash_strictiterators \ qhashfunctions \ + qlatin1string \ qline \ qlinkedlist \ qlist \ -- cgit v1.2.3 From bfb6a8cd44978874a6e80db2c80532dbaf2ff380 Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Mon, 19 Oct 2015 20:22:01 +0300 Subject: QFileSystemModel: avoid detaching Change-Id: If7e9f11e5514b2f8975e7f83c56b606e67f5952f Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/dialogs/qfilesystemmodel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 7e76a6b9d7..2d8b8fadb1 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -243,7 +243,7 @@ QModelIndex QFileSystemModel::index(int row, int column, const QModelIndex &pare Q_ASSERT(parentNode); // now get the internal pointer for the index - QString childName = parentNode->visibleChildren[d->translateVisibleLocation(parentNode, row)]; + const QString &childName = parentNode->visibleChildren.at(d->translateVisibleLocation(parentNode, row)); const QFileSystemModelPrivate::QFileSystemNode *indexNode = parentNode->children.value(childName); Q_ASSERT(indexNode); @@ -797,7 +797,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const !resolvedSymLinks.isEmpty() && dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) { QString fullPath = QDir::fromNativeSeparators(filePath(index)); if (resolvedSymLinks.contains(fullPath)) - return resolvedSymLinks[fullPath]; + return resolvedSymLinks.value(fullPath); } return dirNode->fileName; } @@ -1789,9 +1789,9 @@ void QFileSystemModelPrivate::addVisibleFiles(QFileSystemNode *parentNode, const parentNode->dirtyChildrenIndex = parentNode->visibleChildren.count(); for (int i = 0; i < newFiles.count(); ++i) { - parentNode->visibleChildren.append(newFiles.at(i)); - parentNode->children[newFiles.at(i)]->isVisible = true; - } + parentNode->visibleChildren.append(newFiles.at(i)); + parentNode->children.value(newFiles.at(i))->isVisible = true; + } if (!indexHidden) q->endInsertRows(); } @@ -1813,7 +1813,7 @@ void QFileSystemModelPrivate::removeVisibleFile(QFileSystemNode *parentNode, int if (!indexHidden) q->beginRemoveRows(parent, translateVisibleLocation(parentNode, vLocation), translateVisibleLocation(parentNode, vLocation)); - parentNode->children[parentNode->visibleChildren.at(vLocation)]->isVisible = false; + parentNode->children.value(parentNode->visibleChildren.at(vLocation))->isVisible = false; parentNode->visibleChildren.removeAt(vLocation); if (!indexHidden) q->endRemoveRows(); -- cgit v1.2.3 From d2648d5f3f2c9315813dddfdc11110244f0562b9 Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Tue, 20 Oct 2015 07:54:36 +0300 Subject: QFileSystemModelPrivate::name(): avoid the double-lookup Change-Id: I67507248220fbbddc67ab60ecb1933e1fbacf5fd Reviewed-by: Marc Mutz --- src/widgets/dialogs/qfilesystemmodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 2d8b8fadb1..70df7f305f 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -796,8 +796,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const #endif !resolvedSymLinks.isEmpty() && dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) { QString fullPath = QDir::fromNativeSeparators(filePath(index)); - if (resolvedSymLinks.contains(fullPath)) - return resolvedSymLinks.value(fullPath); + return resolvedSymLinks.value(fullPath, dirNode->fileName); } return dirNode->fileName; } -- cgit v1.2.3 From f4bfdc8610d07203581e033cf95504b294c476f9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 21 Sep 2015 14:04:10 +0200 Subject: Add the proper NOTIFY signal to the primaryScreen property Change-Id: I1c1fa6c93d9c0284b5a9b790c9066a0c8c722d70 Reviewed-by: Marc Mutz --- src/widgets/kernel/qdesktopwidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qdesktopwidget.h b/src/widgets/kernel/qdesktopwidget.h index f5f7d69887..1dfec2d4ad 100644 --- a/src/widgets/kernel/qdesktopwidget.h +++ b/src/widgets/kernel/qdesktopwidget.h @@ -47,7 +47,7 @@ class Q_WIDGETS_EXPORT QDesktopWidget : public QWidget Q_OBJECT Q_PROPERTY(bool virtualDesktop READ isVirtualDesktop) Q_PROPERTY(int screenCount READ screenCount NOTIFY screenCountChanged) - Q_PROPERTY(int primaryScreen READ primaryScreen) + Q_PROPERTY(int primaryScreen READ primaryScreen NOTIFY primaryScreenChanged) public: QDesktopWidget(); ~QDesktopWidget(); -- cgit v1.2.3 From 5c3cd4a6a1972cc31d0e2df5fa07bd8b69355d60 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 15 Oct 2015 16:17:03 +0200 Subject: Move EGLDevice/Output/Stream resolvers into eglconvenience Needed by Qt Wayland as well. Change-Id: Ic349f0a79831e9121cbe9885246897efea2701d5 Reviewed-by: Andy Nichols --- .../eglconvenience/eglconvenience.pri | 6 +- .../eglconvenience/qeglstreamconvenience.cpp | 112 +++++++++++++ .../eglconvenience/qeglstreamconvenience_p.h | 175 +++++++++++++++++++++ .../eglfs_kms_egldevice/eglfs_kms_egldevice.pro | 2 + .../qeglfskmsegldeviceintegration.cpp | 103 +++--------- .../qeglfskmsegldeviceintegration.h | 44 +----- 6 files changed, 319 insertions(+), 123 deletions(-) create mode 100644 src/platformsupport/eglconvenience/qeglstreamconvenience.cpp create mode 100644 src/platformsupport/eglconvenience/qeglstreamconvenience_p.h diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri index 457efd68fb..1cab1e556f 100644 --- a/src/platformsupport/eglconvenience/eglconvenience.pri +++ b/src/platformsupport/eglconvenience/eglconvenience.pri @@ -1,9 +1,11 @@ contains(QT_CONFIG,egl) { HEADERS += \ - $$PWD/qeglconvenience_p.h + $$PWD/qeglconvenience_p.h \ + $$PWD/qeglstreamconvenience_p.h SOURCES += \ - $$PWD/qeglconvenience.cpp + $$PWD/qeglconvenience.cpp \ + $$PWD/qeglstreamconvenience.cpp contains(QT_CONFIG,opengl) { HEADERS += $$PWD/qeglplatformcontext_p.h \ diff --git a/src/platformsupport/eglconvenience/qeglstreamconvenience.cpp b/src/platformsupport/eglconvenience/qeglstreamconvenience.cpp new file mode 100644 index 0000000000..2ace144811 --- /dev/null +++ b/src/platformsupport/eglconvenience/qeglstreamconvenience.cpp @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeglstreamconvenience_p.h" +#include + +QT_BEGIN_NAMESPACE + +QEGLStreamConvenience::QEGLStreamConvenience() + : initialized(false), + has_egl_platform_device(false), + has_egl_device_base(false), + has_egl_stream(false), + has_egl_stream_producer_eglsurface(false), + has_egl_stream_consumer_egloutput(false), + has_egl_output_drm(false), + has_egl_output_base(false), + has_egl_stream_cross_process_fd(false), + has_egl_stream_consumer_gltexture(false) +{ + const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); + if (!extensions) { + qWarning("Failed to query EGL extensions"); + return; + } + + query_devices = reinterpret_cast(eglGetProcAddress("eglQueryDevicesEXT")); + query_device_string = reinterpret_cast(eglGetProcAddress("eglQueryDeviceStringEXT")); + get_platform_display = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); + + has_egl_device_base = strstr(extensions, "EGL_EXT_device_base"); + has_egl_platform_device = strstr(extensions, "EGL_EXT_platform_device"); +} + +void QEGLStreamConvenience::initialize(EGLDisplay dpy) +{ + if (initialized) + return; + + if (!eglBindAPI(EGL_OPENGL_ES_API)) { + qWarning("Failed to bind OpenGL ES API"); + return; + } + + const char *extensions = eglQueryString(dpy, EGL_EXTENSIONS); + if (!extensions) { + qWarning("Failed to query EGL extensions"); + return; + } + + create_stream = reinterpret_cast(eglGetProcAddress("eglCreateStreamKHR")); + destroy_stream = reinterpret_cast(eglGetProcAddress("eglDestroyStreamKHR")); + stream_attrib = reinterpret_cast(eglGetProcAddress("eglStreamAttribKHR")); + query_stream = reinterpret_cast(eglGetProcAddress("eglQueryStreamKHR")); + query_stream_u64 = reinterpret_cast(eglGetProcAddress("eglQueryStreamu64KHR")); + create_stream_producer_surface = reinterpret_cast(eglGetProcAddress("eglCreateStreamProducerSurfaceKHR")); + stream_consumer_output = reinterpret_cast(eglGetProcAddress("eglStreamConsumerOutputEXT")); + get_output_layers = reinterpret_cast(eglGetProcAddress("eglGetOutputLayersEXT")); + get_output_ports = reinterpret_cast(eglGetProcAddress("eglGetOutputPortsEXT")); + output_layer_attrib = reinterpret_cast(eglGetProcAddress("eglOutputLayerAttribEXT")); + query_output_layer_attrib = reinterpret_cast(eglGetProcAddress("eglQueryOutputLayerAttribEXT")); + query_output_layer_string = reinterpret_cast(eglGetProcAddress("eglQueryOutputLayerStringEXT")); + query_output_port_attrib = reinterpret_cast(eglGetProcAddress("eglQueryOutputPortAttribEXT")); + query_output_port_string = reinterpret_cast(eglGetProcAddress("eglQueryOutputPortStringEXT")); + get_stream_file_descriptor = reinterpret_cast(eglGetProcAddress("eglGetStreamFileDescriptorKHR")); + create_stream_from_file_descriptor = reinterpret_cast(eglGetProcAddress("eglCreateStreamFromFileDescriptorKHR")); + stream_consumer_gltexture = reinterpret_cast(eglGetProcAddress("eglStreamConsumerGLTextureExternalKHR")); + stream_consumer_acquire = reinterpret_cast(eglGetProcAddress("eglStreamConsumerAcquireKHR")); + stream_consumer_release = reinterpret_cast(eglGetProcAddress("eglStreamConsumerReleaseKHR")); + + has_egl_stream = strstr(extensions, "EGL_KHR_stream"); + has_egl_stream_producer_eglsurface = strstr(extensions, "EGL_KHR_stream_producer_eglsurface"); + has_egl_stream_consumer_egloutput = strstr(extensions, "EGL_EXT_stream_consumer_egloutput"); + has_egl_output_drm = strstr(extensions, "EGL_EXT_output_drm"); + has_egl_output_base = strstr(extensions, "EGL_EXT_output_base"); + has_egl_stream_cross_process_fd = strstr(extensions, "EGL_KHR_stream_cross_process_fd"); + has_egl_stream_consumer_gltexture = strstr(extensions, "EGL_KHR_stream_consumer_gltexture"); + + initialized = true; +} + +QT_END_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h new file mode 100644 index 0000000000..12787d03ae --- /dev/null +++ b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEGLSTREAMCONVENIENCE_H +#define QEGLSTREAMCONVENIENCE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +// This provides runtime EGLDevice/Output/Stream support even when eglext.h in +// the sysroot is not up-to-date. + +#ifndef EGL_VERSION_1_5 +typedef intptr_t EGLAttrib; +#endif + +#ifndef EGL_EXT_platform_base +typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); +#endif + +#ifndef EGL_EXT_device_base +typedef void *EGLDeviceEXT; +#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0)) +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); +typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); +#endif + +#ifndef EGL_EXT_output_base +typedef void *EGLOutputLayerEXT; +typedef void *EGLOutputPortEXT; +#define EGL_NO_OUTPUT_LAYER_EXT ((EGLOutputLayerEXT)0) +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); +typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); +typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); +#endif + +#ifndef EGL_KHR_stream +typedef void *EGLStreamKHR; +typedef quint64 EGLuint64KHR; +#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +#endif + +#ifndef EGL_KHR_stream_producer_eglsurface +#define EGL_STREAM_BIT_KHR 0x0800 +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +#endif + +#ifndef EGL_KHR_stream_cross_process_fd +typedef int EGLNativeFileDescriptorKHR; +#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) +typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +#endif + +#ifndef EGL_KHR_stream_consumer_gltexture +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); +#endif + +#ifndef EGL_EXT_stream_consumer_egloutput +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); +#endif + +#ifndef EGL_EXT_platform_device +#define EGL_PLATFORM_DEVICE_EXT 0x313F +#endif + +#ifndef EGL_EXT_device_drm +#define EGL_DRM_DEVICE_FILE_EXT 0x3233 +#endif + +#ifndef EGL_EXT_output_drm +#define EGL_DRM_CRTC_EXT 0x3234 +#define EGL_DRM_PLANE_EXT 0x3235 +#endif + +QT_BEGIN_NAMESPACE + +class QEGLStreamConvenience +{ +public: + QEGLStreamConvenience(); + void initialize(EGLDisplay dpy); + + PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display; + PFNEGLQUERYDEVICESEXTPROC query_devices; + PFNEGLQUERYDEVICESTRINGEXTPROC query_device_string; + PFNEGLCREATESTREAMKHRPROC create_stream; + PFNEGLDESTROYSTREAMKHRPROC destroy_stream; + PFNEGLSTREAMATTRIBKHRPROC stream_attrib; + PFNEGLQUERYSTREAMKHRPROC query_stream; + PFNEGLQUERYSTREAMU64KHRPROC query_stream_u64; + PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC create_stream_producer_surface; + PFNEGLSTREAMCONSUMEROUTPUTEXTPROC stream_consumer_output; + PFNEGLGETOUTPUTLAYERSEXTPROC get_output_layers; + PFNEGLGETOUTPUTPORTSEXTPROC get_output_ports; + PFNEGLOUTPUTLAYERATTRIBEXTPROC output_layer_attrib; + PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC query_output_layer_attrib; + PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC query_output_layer_string; + PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC query_output_port_attrib; + PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC query_output_port_string; + PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC get_stream_file_descriptor; + PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC create_stream_from_file_descriptor; + PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC stream_consumer_gltexture; + PFNEGLSTREAMCONSUMERACQUIREKHRPROC stream_consumer_acquire; + PFNEGLSTREAMCONSUMERRELEASEKHRPROC stream_consumer_release; + + bool initialized; + + bool has_egl_platform_device; + bool has_egl_device_base; + bool has_egl_stream; + bool has_egl_stream_producer_eglsurface; + bool has_egl_stream_consumer_egloutput; + bool has_egl_output_drm; + bool has_egl_output_base; + bool has_egl_stream_cross_process_fd; + bool has_egl_stream_consumer_gltexture; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro index 2274c5b228..393ddd14a5 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro @@ -8,6 +8,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. +DEFINES += MESA_EGL_NO_X11_HEADERS + CONFIG += egl QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index 2f32bd73a3..1ddcb3b862 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -45,6 +45,7 @@ QEglFSKmsEglDeviceIntegration::QEglFSKmsEglDeviceIntegration() , m_drm_connector(Q_NULLPTR) , m_drm_encoder(Q_NULLPTR) , m_drm_crtc(0) + , m_funcs(Q_NULLPTR) { qCDebug(qLcEglfsKmsDebug, "New DRM/KMS on EGLDevice integration created"); } @@ -54,7 +55,7 @@ void QEglFSKmsEglDeviceIntegration::platformInit() if (!query_egl_device()) qFatal("Could not set up EGL device!"); - const char *deviceName = m_query_device_string(m_egl_device, EGL_DRM_DEVICE_FILE_EXT); + const char *deviceName = m_funcs->query_device_string(m_egl_device, EGL_DRM_DEVICE_FILE_EXT); if (!deviceName) qFatal("Failed to query device name from EGLDevice"); @@ -76,6 +77,9 @@ void QEglFSKmsEglDeviceIntegration::platformDestroy() qErrnoWarning("Could not close DRM device"); m_dri_fd = -1; + + delete m_funcs; + m_funcs = Q_NULLPTR; } EGLNativeDisplayType QEglFSKmsEglDeviceIntegration::platformDisplay() const @@ -87,18 +91,13 @@ EGLDisplay QEglFSKmsEglDeviceIntegration::createDisplay(EGLNativeDisplayType nat { qCDebug(qLcEglfsKmsDebug, "Creating display"); - const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - - m_get_platform_display = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); - m_has_egl_platform_device = extensions && strstr(extensions, "EGL_EXT_platform_device"); - EGLDisplay display; - if (!m_has_egl_platform_device) { + if (m_funcs->has_egl_platform_device) { + display = m_funcs->get_platform_display(EGL_PLATFORM_DEVICE_EXT, nativeDisplay, Q_NULLPTR); + } else { qWarning("EGL_EXT_platform_device not available, falling back to legacy path!"); display = eglGetDisplay(nativeDisplay); - } else { - display = m_get_platform_display(EGL_PLATFORM_DEVICE_EXT, nativeDisplay, Q_NULLPTR); } if (display == EGL_NO_DISPLAY) @@ -165,7 +164,7 @@ public: void QEglJetsonTK1Window::invalidateSurface() { QEglFSWindow::invalidateSurface(); - m_integration->m_destroy_stream(screen()->display(), m_egl_stream); + m_integration->m_funcs->destroy_stream(screen()->display(), m_egl_stream); } void QEglJetsonTK1Window::resetSurface() @@ -176,7 +175,7 @@ void QEglJetsonTK1Window::resetSurface() EGLOutputLayerEXT layer = EGL_NO_OUTPUT_LAYER_EXT; EGLint count; - m_egl_stream = m_integration->m_create_stream(display, Q_NULLPTR); + m_egl_stream = m_integration->m_funcs->create_stream(display, Q_NULLPTR); if (m_egl_stream == EGL_NO_STREAM_KHR) { qWarning("resetSurface: Couldn't create EGLStream for native window"); return; @@ -184,7 +183,7 @@ void QEglJetsonTK1Window::resetSurface() qCDebug(qLcEglfsKmsDebug, "Created stream %p on display %p", m_egl_stream, display); - if (!m_integration->m_get_output_layers(display, Q_NULLPTR, Q_NULLPTR, 0, &count) || count == 0) { + if (!m_integration->m_funcs->get_output_layers(display, Q_NULLPTR, Q_NULLPTR, 0, &count) || count == 0) { qWarning("No output layers found"); return; } @@ -194,20 +193,20 @@ void QEglJetsonTK1Window::resetSurface() QVector layers; layers.resize(count); EGLint actualCount; - if (!m_integration->m_get_output_layers(display, Q_NULLPTR, layers.data(), count, &actualCount)) { + if (!m_integration->m_funcs->get_output_layers(display, Q_NULLPTR, layers.data(), count, &actualCount)) { qWarning("Failed to get layers"); return; } for (int i = 0; i < actualCount; ++i) { EGLAttrib id; - if (m_integration->m_query_output_layer_attrib(display, layers[i], EGL_DRM_CRTC_EXT, &id)) { - qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - crtc %d", i, layers[i], id); + if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_CRTC_EXT, &id)) { + qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - crtc %d", i, layers[i], (int) id); if (id == EGLAttrib(m_integration->m_drm_crtc)) layer = layers[i]; - } else if (m_integration->m_query_output_layer_attrib(display, layers[i], EGL_DRM_PLANE_EXT, &id)) { + } else if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_PLANE_EXT, &id)) { // Not used yet, just for debugging. - qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - plane %d", i, layers[i], id); + qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - plane %d", i, layers[i], (int) id); } else { qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - unknown", i, layers[i]); } @@ -227,7 +226,7 @@ void QEglJetsonTK1Window::resetSurface() qCDebug(qLcEglfsKmsDebug, "Using layer %p", layer); - if (!m_integration->m_stream_consumer_output(display, m_egl_stream, layer)) + if (!m_integration->m_funcs->stream_consumer_output(display, m_egl_stream, layer)) qWarning("resetSurface: Unable to connect stream"); m_config = QEglFSIntegration::chooseConfig(display, m_integration->surfaceFormatFor(window()->requestedFormat())); @@ -244,7 +243,7 @@ void QEglJetsonTK1Window::resetSurface() EGL_NONE }; - m_surface = m_integration->m_create_stream_producer_surface(display, m_config, m_egl_stream, stream_producer_attribs); + m_surface = m_integration->m_funcs->create_stream_producer_surface(display, m_config, m_egl_stream, stream_producer_attribs); if (m_surface == EGL_NO_SURFACE) return; @@ -255,7 +254,9 @@ QEglFSWindow *QEglFSKmsEglDeviceIntegration::createWindow(QWindow *window) const { QEglJetsonTK1Window *eglWindow = new QEglJetsonTK1Window(window, this); - if (!const_cast(this)->query_egl_extensions(eglWindow->screen()->display())) + m_funcs->initialize(eglWindow->screen()->display()); + if (!(m_funcs->has_egl_output_base && m_funcs->has_egl_output_drm && m_funcs->has_egl_stream + && m_funcs->has_egl_stream_producer_eglsurface && m_funcs->has_egl_stream_consumer_egloutput)) qFatal("Required extensions missing!"); return eglWindow; @@ -385,21 +386,12 @@ bool QEglFSKmsEglDeviceIntegration::setup_kms() bool QEglFSKmsEglDeviceIntegration::query_egl_device() { - const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - if (!extensions) { - qWarning("eglQueryString failed"); - return false; - } - - m_has_egl_device_base = strstr(extensions, "EGL_EXT_device_base"); - m_query_devices = reinterpret_cast(eglGetProcAddress("eglQueryDevicesEXT")); - m_query_device_string = reinterpret_cast(eglGetProcAddress("eglQueryDeviceStringEXT")); - - if (!m_has_egl_device_base || !m_query_devices || !m_query_device_string) + m_funcs = new QEGLStreamConvenience; + if (!m_funcs->has_egl_device_base) qFatal("EGL_EXT_device_base missing"); EGLint num_devices = 0; - if (m_query_devices(1, &m_egl_device, &num_devices) != EGL_TRUE) { + if (m_funcs->query_devices(1, &m_egl_device, &num_devices) != EGL_TRUE) { qWarning("eglQueryDevicesEXT failed: eglError: %x", eglGetError()); return false; } @@ -414,51 +406,4 @@ bool QEglFSKmsEglDeviceIntegration::query_egl_device() return true; } -bool QEglFSKmsEglDeviceIntegration::query_egl_extensions(EGLDisplay display) -{ - if (!eglBindAPI(EGL_OPENGL_ES_API)) { - qWarning() << Q_FUNC_INFO << "failed to bind EGL_OPENGL_ES_API"; - return false; - } - - m_create_stream = reinterpret_cast(eglGetProcAddress("eglCreateStreamKHR")); - m_destroy_stream = reinterpret_cast(eglGetProcAddress("eglDestroyStreamKHR")); - m_stream_attrib = reinterpret_cast(eglGetProcAddress("eglStreamAttribKHR")); - m_query_stream = reinterpret_cast(eglGetProcAddress("eglQueryStreamKHR")); - m_query_stream_u64 = reinterpret_cast(eglGetProcAddress("eglQueryStreamu64KHR")); - m_create_stream_producer_surface = reinterpret_cast(eglGetProcAddress("eglCreateStreamProducerSurfaceKHR")); - m_stream_consumer_output = reinterpret_cast(eglGetProcAddress("eglStreamConsumerOutputEXT")); - m_get_output_layers = reinterpret_cast(eglGetProcAddress("eglGetOutputLayersEXT")); - m_get_output_ports = reinterpret_cast(eglGetProcAddress("eglGetOutputPortsEXT")); - m_output_layer_attrib = reinterpret_cast(eglGetProcAddress("eglOutputLayerAttribEXT")); - m_query_output_layer_attrib = reinterpret_cast(eglGetProcAddress("eglQueryOutputLayerAttribEXT")); - m_query_output_layer_string = reinterpret_cast(eglGetProcAddress("eglQueryOutputLayerStringEXT")); - m_query_output_port_attrib = reinterpret_cast(eglGetProcAddress("eglQueryOutputPortAttribEXT")); - m_query_output_port_string = reinterpret_cast(eglGetProcAddress("eglQueryOutputPortStringEXT")); - m_get_stream_file_descriptor = reinterpret_cast(eglGetProcAddress("eglGetStreamFileDescriptorKHR")); - m_create_stream_from_file_descriptor = reinterpret_cast(eglGetProcAddress("eglCreateStreamFromFileDescriptorKHR")); - m_stream_consumer_gltexture = reinterpret_cast(eglGetProcAddress("eglStreamConsumerGLTextureExternalKHR")); - m_stream_consumer_acquire = reinterpret_cast(eglGetProcAddress("eglStreamConsumerAcquireKHR")); - - const char *extensions = eglQueryString(display, EGL_EXTENSIONS); - if (!extensions) { - qWarning() << Q_FUNC_INFO << "eglQueryString failed"; - return false; - } - - m_has_egl_stream = strstr(extensions, "EGL_KHR_stream"); - m_has_egl_stream_producer_eglsurface = strstr(extensions, "EGL_KHR_stream_producer_eglsurface"); - m_has_egl_stream_consumer_egloutput = strstr(extensions, "EGL_EXT_stream_consumer_egloutput"); - m_has_egl_output_drm = strstr(extensions, "EGL_EXT_output_drm"); - m_has_egl_output_base = strstr(extensions, "EGL_EXT_output_base"); - m_has_egl_stream_cross_process_fd = strstr(extensions, "EGL_KHR_stream_cross_process_fd"); - m_has_egl_stream_consumer_gltexture = strstr(extensions, "EGL_KHR_stream_consumer_gltexture"); - - return m_has_egl_output_base && - m_has_egl_output_drm && - m_has_egl_stream && - m_has_egl_stream_producer_eglsurface && - m_has_egl_stream_consumer_egloutput; -} - QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h index c6132354a8..a89a65ca55 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h @@ -49,8 +49,7 @@ #include #include -#include -#include +#include QT_BEGIN_NAMESPACE @@ -75,9 +74,7 @@ public: bool supportsSurfacelessContexts() const Q_DECL_OVERRIDE; bool setup_kms(); - bool query_egl_device(); - bool query_egl_extensions(EGLDisplay display); // device bits QByteArray m_device; @@ -92,44 +89,7 @@ public: quint32 m_drm_crtc; // EGLStream infrastructure - PFNEGLGETPLATFORMDISPLAYEXTPROC m_get_platform_display; - bool m_has_egl_platform_device; - - PFNEGLQUERYDEVICESEXTPROC m_query_devices; - PFNEGLQUERYDEVICESTRINGEXTPROC m_query_device_string; - bool m_has_egl_device_base; - - PFNEGLCREATESTREAMKHRPROC m_create_stream; - PFNEGLDESTROYSTREAMKHRPROC m_destroy_stream; - PFNEGLSTREAMATTRIBKHRPROC m_stream_attrib; - PFNEGLQUERYSTREAMKHRPROC m_query_stream; - PFNEGLQUERYSTREAMU64KHRPROC m_query_stream_u64; - bool m_has_egl_stream; - - PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC m_create_stream_producer_surface; - bool m_has_egl_stream_producer_eglsurface; - - PFNEGLSTREAMCONSUMEROUTPUTEXTPROC m_stream_consumer_output; - bool m_has_egl_stream_consumer_egloutput; - - bool m_has_egl_output_drm; - - PFNEGLGETOUTPUTLAYERSEXTPROC m_get_output_layers; - PFNEGLGETOUTPUTPORTSEXTPROC m_get_output_ports; - PFNEGLOUTPUTLAYERATTRIBEXTPROC m_output_layer_attrib; - PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC m_query_output_layer_attrib; - PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC m_query_output_layer_string; - PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC m_query_output_port_attrib; - PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC m_query_output_port_string; - bool m_has_egl_output_base; - - PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC m_get_stream_file_descriptor; - PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC m_create_stream_from_file_descriptor; - bool m_has_egl_stream_cross_process_fd; - - PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC m_stream_consumer_gltexture; - PFNEGLSTREAMCONSUMERACQUIREKHRPROC m_stream_consumer_acquire; - bool m_has_egl_stream_consumer_gltexture; + QEGLStreamConvenience *m_funcs; }; QT_END_NAMESPACE -- cgit v1.2.3 From 21b1a492edbdf74de9de8709b37b9f2483b35bed Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Mon, 19 Oct 2015 14:30:33 +0200 Subject: Doc: Add the Map Viewer example to the highlighted examples list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that Qt Location is a fully-supported module in 5.6, it is worth highlighting an example that demonstrates the new feature. Change-Id: I70553f84af5587e3604115684ea1ea75203b91ce Reviewed-by: Topi Reiniö Reviewed-by: Alex Blasche --- doc/global/manifest-meta.qdocconf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index e7f0464efd..b5eaf96a3f 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -51,7 +51,8 @@ manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \ "QtQuickDialogs/Qt Quick System Dialog Examples" \ "QtWinExtras/Quick Player" \ "QtMultimedia/QML Video Shader Effects Example" \ - "QtCanvas3D/Planets Example" + "QtCanvas3D/Planets Example" \ + "QtLocation/Map Viewer (QML)" manifestmeta.highlighted.attributes = isHighlighted:true -- cgit v1.2.3 From dd8351b654180205c63e06c5099a1329762a91d2 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 18 Oct 2015 15:50:05 +0200 Subject: QLatin1String: add default ctor A pending change in uic depends on this. [ChangeLog][QtCore][QLatin1String] Added default constructor. Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Thiago Macieira --- src/corelib/tools/qstring.cpp | 6 ++++++ src/corelib/tools/qstring.h | 1 + tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 38b5dcfe1f..f2c44a1de9 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -8225,6 +8225,12 @@ QString &QString::setRawData(const QChar *unicode, int size) \sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral} */ +/*! \fn QLatin1String::QLatin1String() + \since 5.6 + + Constructs a QLatin1String object that stores a nullptr. +*/ + /*! \fn QLatin1String::QLatin1String(const char *str) Constructs a QLatin1String object that stores \a str. diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 7829317d1f..4c51b84ab8 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -83,6 +83,7 @@ template class QVector; class QLatin1String { public: + Q_DECL_CONSTEXPR inline QLatin1String() Q_DECL_NOTHROW : m_size(0), m_data(Q_NULLPTR) {} Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s) : m_size(s ? int(strlen(s)) : 0), m_data(s) {} Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s, int sz) : m_size(sz), m_data(s) {} inline explicit QLatin1String(const QByteArray &s) : m_size(s.size()), m_data(s.constData()) {} diff --git a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp index 5b83fe1958..290c9fc12a 100644 --- a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp +++ b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp @@ -46,6 +46,16 @@ private Q_SLOTS: void tst_QLatin1String::nullString() { + // default ctor + { + QLatin1String l1; + QCOMPARE(static_cast(l1.data()), static_cast(Q_NULLPTR)); + QCOMPARE(l1.size(), 0); + + QString s = l1; + QVERIFY(s.isNull()); + } + // from nullptr { const char *null = Q_NULLPTR; -- cgit v1.2.3 From 6df48eb668be4db85c48a4ae3ed22be2c70a9041 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 20 Oct 2015 09:59:58 +0200 Subject: Fix compilation on OSX when building in a namespace. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I377d9ffe95b72e098a91e6da564b59a56b34cf4e Reviewed-by: Morten Johan Sørvig --- src/corelib/kernel/qcfsocketnotifier.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/kernel/qcfsocketnotifier.cpp b/src/corelib/kernel/qcfsocketnotifier.cpp index 19f9e744b8..24e1e0ac9a 100644 --- a/src/corelib/kernel/qcfsocketnotifier.cpp +++ b/src/corelib/kernel/qcfsocketnotifier.cpp @@ -36,6 +36,7 @@ #include #include +QT_BEGIN_NAMESPACE /************************************************************************** Socket Notifiers @@ -301,3 +302,5 @@ void QCFSocketNotifier::enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoo } } } + +QT_END_NAMESPACE -- cgit v1.2.3 From 9b54f4c81c66917eb6d64f501007da5d3852b3f2 Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Sat, 17 Oct 2015 15:39:47 +0300 Subject: QFileSystemModel: cleanup sortChildren() Second value of QPair is not used. And add reserve for "indexNode->visibleChildren" list before pushing. Change-Id: Ia002130c929f71e0802f73f4c0694fd2887b4c91 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/dialogs/qfilesystemmodel.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 70df7f305f..67af7f8107 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1111,10 +1111,10 @@ public: return false; } - bool operator()(const QPair &l, - const QPair &r) const + bool operator()(const QFileSystemModelPrivate::QFileSystemNode *l, + const QFileSystemModelPrivate::QFileSystemNode *r) const { - return compareNodes(l.first, r.first); + return compareNodes(l, r); } @@ -1134,16 +1134,14 @@ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent if (indexNode->children.count() == 0) return; - QList > values; + QVector values; QHash::const_iterator iterator; - int i = 0; for(iterator = indexNode->children.constBegin() ; iterator != indexNode->children.constEnd() ; ++iterator) { if (filtersAcceptsNode(iterator.value())) { - values.append(QPair((iterator.value()), i)); + values.append(iterator.value()); } else { iterator.value()->isVisible = false; } - i++; } QFileSystemModelSorter ms(column); std::sort(values.begin(), values.end(), ms); @@ -1151,9 +1149,11 @@ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent indexNode->visibleChildren.clear(); //No more dirty item we reset our internal dirty index indexNode->dirtyChildrenIndex = -1; - for (int i = 0; i < values.count(); ++i) { - indexNode->visibleChildren.append(values.at(i).first->fileName); - values.at(i).first->isVisible = true; + const int numValues = values.count(); + indexNode->visibleChildren.reserve(numValues); + for (int i = 0; i < numValues; ++i) { + indexNode->visibleChildren.append(values.at(i)->fileName); + values.at(i)->isVisible = true; } if (!disableRecursiveSort) { -- cgit v1.2.3 From 31ef0d0dd6df192101094df518f21f7aaacc103c Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 20 Oct 2015 10:03:43 +0300 Subject: Android: Warnings-- Change-Id: I79bef1e5e73fedf2bae61d6cfc9634a14958ba0e Reviewed-by: Christian Stromme --- src/corelib/io/qstorageinfo_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index 54a2855239..262703b9e6 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -238,7 +238,7 @@ inline QByteArray QStorageIterator::device() const #elif defined(Q_OS_ANDROID) -static const char pathMounted[] = "/proc/mounts"; +static const QLatin1String pathMounted("/proc/mounts"); inline QStorageIterator::QStorageIterator() { -- cgit v1.2.3 From f35797991ea450478f4703399a551ca85bde053d Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Fri, 16 Oct 2015 17:22:14 +0300 Subject: Android: Make sure we deliver all queued actions when we resume. When the activity is paused, all runOnUi actions are dropped :(, this patch ensures that no action is lost no matter what. Task-number: QTBUG-45526 Change-Id: I61db4f73b0d2da47bf71a1324dc40b90dab01e81 Reviewed-by: Christian Stromme --- .../qtproject/qt5/android/QtActivityDelegate.java | 30 ++++++++-------------- .../src/org/qtproject/qt5/android/QtNative.java | 27 +++++++++++++------ 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java index 064b538e1f..a6067b1a10 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java @@ -77,7 +77,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; public class QtActivityDelegate { @@ -211,10 +210,10 @@ public class QtActivityDelegate private final int EnterKeyPrevious = 7; // application state - private final int ApplicationSuspended = 0x0; - private final int ApplicationHidden = 0x1; - private final int ApplicationInactive = 0x2; - private final int ApplicationActive = 0x4; + public static final int ApplicationSuspended = 0x0; + public static final int ApplicationHidden = 0x1; + public static final int ApplicationInactive = 0x2; + public static final int ApplicationActive = 0x4; public boolean setKeyboardVisibility(boolean visibility, long timeStamp) @@ -902,24 +901,15 @@ public class QtActivityDelegate public void onPause() { - QtNative.updateApplicationState(ApplicationInactive); + QtNative.setApplicationState(ApplicationInactive); } public void onResume() { - // fire all lostActions - synchronized (QtNative.m_mainActivityMutex) - { - Iterator itr = QtNative.getLostActions().iterator(); - while (itr.hasNext()) - m_activity.runOnUiThread(itr.next()); - - QtNative.updateApplicationState(ApplicationActive); - if (m_started) { - QtNative.clearLostActions(); - QtNative.updateWindow(); - updateFullScreen(); // Suspending the app clears the immersive mode, so we need to set it again. - } + QtNative.setApplicationState(ApplicationActive); + if (m_started) { + QtNative.updateWindow(); + updateFullScreen(); // Suspending the app clears the immersive mode, so we need to set it again. } } @@ -942,7 +932,7 @@ public class QtActivityDelegate public void onStop() { - QtNative.updateApplicationState(ApplicationSuspended); + QtNative.setApplicationState(ApplicationSuspended); } public Object onRetainNonConfigurationInstance() diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java index 94e0e4e92b..07ef6d657d 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java @@ -55,6 +55,7 @@ import android.view.View; import java.security.KeyStore; import java.security.cert.X509Certificate; +import java.util.Iterator; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; @@ -62,6 +63,7 @@ import javax.net.ssl.X509TrustManager; public class QtNative { private static Activity m_activity = null; + private static boolean m_activityPaused = false; private static QtActivityDelegate m_activityDelegate = null; public static Object m_mainActivityMutex = new Object(); // mutex used to synchronize runnable operations @@ -166,14 +168,23 @@ public class QtNative } } - static public ArrayList getLostActions() + public static void setApplicationState(int state) { - return m_lostActions; - } - - static public void clearLostActions() - { - m_lostActions.clear(); + synchronized (m_mainActivityMutex) { + switch (state) { + case QtActivityDelegate.ApplicationActive: + m_activityPaused = false; + Iterator itr = m_lostActions.iterator(); + while (itr.hasNext()) + runAction(itr.next()); + m_lostActions.clear(); + break; + default: + m_activityPaused = true; + break; + } + } + updateApplicationState(state); } private static void runAction(Runnable action) @@ -181,7 +192,7 @@ public class QtNative synchronized (m_mainActivityMutex) { final Looper mainLooper = Looper.getMainLooper(); final Handler handler = new Handler(mainLooper); - final boolean actionIsQueued = m_activity != null && mainLooper != null && handler.post(action); + final boolean actionIsQueued = !m_activityPaused && m_activity != null && mainLooper != null && handler.post(action); if (!actionIsQueued) m_lostActions.add(action); } -- cgit v1.2.3 From 101a6bda4573237f0a31b1b947ea1af0fa7fb37c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 20 Oct 2015 12:54:48 +0200 Subject: Fix GL_VERSION parsing when using WGL Unlike other platforms and the EGL path, this one tries to parse GL_VERSION on its own. Unfortunately it breaks for certain version strings: we cannot assume more than major.minor in the beginning and so looking for a second dot is wrong. For example, "2.1 Mesa 7.11-devel" is parsed as major "2", minor "1 Mesa 7" (result in 0), leading to a version of 2.0 instead of 2.1. To overcome this, use the common helper function in QPlatformOpenGLContext. Change-Id: I460f4276a3a06659b542e0c076ddc1ada3122907 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index a7c14ed2ac..e372acc747 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -856,16 +856,11 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current() { QWindowsOpenGLContextFormat result; const QByteArray version = QOpenGLStaticContext::getGlString(GL_VERSION); - const int majorDot = version.indexOf('.'); - if (majorDot != -1) { - int minorDot = version.indexOf('.', majorDot + 1); - if (minorDot == -1) - minorDot = version.size(); - result.version = (version.mid(0, majorDot).toInt() << 8) - + version.mid(majorDot + 1, minorDot - majorDot - 1).toInt(); - } else { + int major, minor; + if (QPlatformOpenGLContext::parseOpenGLVersion(version, major, minor)) + result.version = (major << 8) + minor; + else result.version = 0x0200; - } result.profile = QSurfaceFormat::NoProfile; if (result.version < 0x0300) { result.options |= QSurfaceFormat::DeprecatedFunctions; -- cgit v1.2.3 From 5a2d0cf5feb73dd7ea542ad1c61f1e60c113052e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 18 Oct 2015 16:42:49 +0200 Subject: [docs] QLatin1String: add some guidance as to when to use it Change-Id: I391be8bda3a5cb4873b89b437d2b76b1cd88261f Reviewed-by: Lars Knoll Reviewed-by: Martin Smith Reviewed-by: Mitch Curtis --- src/corelib/tools/qstring.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index f2c44a1de9..39e0f6825e 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -8222,6 +8222,13 @@ QString &QString::setRawData(const QChar *unicode, int size) \snippet code/src_corelib_tools_qstring.cpp 6 + \note If the function you're calling with a QLatin1String + argument isn't actually overloaded to take QLatin1String, the + implicit conversion to QString will trigger a memory allocation, + which is usually what you want to avoid by using QLatin1String + in the first place. In those cases, using QStringLiteral may be + the better option. + \sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral} */ -- cgit v1.2.3 From f43bc7ade5a2c2e9542390e04a9e4fba01505539 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 16 Oct 2015 14:33:25 +0200 Subject: msvc2015: Align compiler flags with rest of Qt build msvc-desktop.conf does disable the exception warning for building all modules, so use the same set of compiler flags for building qmake. Change-Id: I97026f3cb78e656e8de76e1c8afe19cec6501499 Reviewed-by: Kai Koehne --- qmake/Makefile.win32 | 2 +- tools/configure/Makefile.win32 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index c673899f18..e61e9503f3 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -22,7 +22,7 @@ CFLAGS_EXTRA = /Zc:wchar_t- ! elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013" CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS $(CFLAGS_CRT) ! elseif "$(QMAKESPEC)" == "win32-msvc2015" -CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /Zc:strictStrings /w44456 /w44457 /w44458 $(CFLAGS_CRT) +CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /Zc:strictStrings /w44456 /w44457 /w44458 /wd4577 $(CFLAGS_CRT) ! else ! error Unsupported compiler for this Makefile ! endif diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index d3a28e73ab..8d6fe8bf72 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -5,7 +5,7 @@ CONFSRC = $(TOOLSRC)\configure PCH = configure_pch.pch DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008" -CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) +CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) LINK = link LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" -- cgit v1.2.3 From 4388c6a6697b700600b3125c090cbc36854dcd4a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 19 Oct 2015 00:08:22 +0200 Subject: QLatin1String: add some nothrow Change-Id: I488fe7c4122febf46caa6487d92f61391edd41a5 Reviewed-by: Thiago Macieira --- src/corelib/tools/qstring.h | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 4c51b84ab8..d21708efb9 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -84,20 +84,20 @@ class QLatin1String { public: Q_DECL_CONSTEXPR inline QLatin1String() Q_DECL_NOTHROW : m_size(0), m_data(Q_NULLPTR) {} - Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s) : m_size(s ? int(strlen(s)) : 0), m_data(s) {} - Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s, int sz) : m_size(sz), m_data(s) {} - inline explicit QLatin1String(const QByteArray &s) : m_size(s.size()), m_data(s.constData()) {} + Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s) Q_DECL_NOTHROW : m_size(s ? int(strlen(s)) : 0), m_data(s) {} + Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s, int sz) Q_DECL_NOTHROW : m_size(sz), m_data(s) {} + inline explicit QLatin1String(const QByteArray &s) Q_DECL_NOTHROW : m_size(s.size()), m_data(s.constData()) {} - inline const char *latin1() const { return m_data; } - inline int size() const { return m_size; } - inline const char *data() const { return m_data; } + Q_DECL_CONSTEXPR const char *latin1() const Q_DECL_NOTHROW { return m_data; } + Q_DECL_CONSTEXPR int size() const Q_DECL_NOTHROW { return m_size; } + Q_DECL_CONSTEXPR const char *data() const Q_DECL_NOTHROW { return m_data; } - inline bool operator==(const QString &s) const; - inline bool operator!=(const QString &s) const; - inline bool operator>(const QString &s) const; - inline bool operator<(const QString &s) const; - inline bool operator>=(const QString &s) const; - inline bool operator<=(const QString &s) const; + inline bool operator==(const QString &s) const Q_DECL_NOTHROW; + inline bool operator!=(const QString &s) const Q_DECL_NOTHROW; + inline bool operator>(const QString &s) const Q_DECL_NOTHROW; + inline bool operator<(const QString &s) const Q_DECL_NOTHROW; + inline bool operator>=(const QString &s) const Q_DECL_NOTHROW; + inline bool operator<=(const QString &s) const Q_DECL_NOTHROW; #if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII) inline QT_ASCII_CAST_WARN bool operator==(const char *s) const; @@ -1131,34 +1131,34 @@ inline bool operator!=(QString::Null, QString::Null) { return false; } inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); } inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); } -inline bool operator==(QLatin1String s1, QLatin1String s2) +inline bool operator==(QLatin1String s1, QLatin1String s2) Q_DECL_NOTHROW { return (s1.size() == s2.size() && !memcmp(s1.latin1(), s2.latin1(), s1.size())); } -inline bool operator!=(QLatin1String s1, QLatin1String s2) +inline bool operator!=(QLatin1String s1, QLatin1String s2) Q_DECL_NOTHROW { return (s1.size() != s2.size() || memcmp(s1.latin1(), s2.latin1(), s1.size())); } -inline bool operator<(QLatin1String s1, QLatin1String s2) +inline bool operator<(QLatin1String s1, QLatin1String s2) Q_DECL_NOTHROW { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); return (r < 0) || (r == 0 && s1.size() < s2.size()); } -inline bool operator<=(QLatin1String s1, QLatin1String s2) +inline bool operator<=(QLatin1String s1, QLatin1String s2) Q_DECL_NOTHROW { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); return (r < 0) || (r == 0 && s1.size() <= s2.size()); } -inline bool operator>(QLatin1String s1, QLatin1String s2) +inline bool operator>(QLatin1String s1, QLatin1String s2) Q_DECL_NOTHROW { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); return (r > 0) || (r == 0 && s1.size() > s2.size()); } -inline bool operator>=(QLatin1String s1, QLatin1String s2) +inline bool operator>=(QLatin1String s1, QLatin1String s2) Q_DECL_NOTHROW { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); return (r > 0) || (r == 0 && s1.size() >= s2.size()); } -inline bool QLatin1String::operator==(const QString &s) const +inline bool QLatin1String::operator==(const QString &s) const Q_DECL_NOTHROW { return s == *this; } -inline bool QLatin1String::operator!=(const QString &s) const +inline bool QLatin1String::operator!=(const QString &s) const Q_DECL_NOTHROW { return s != *this; } -inline bool QLatin1String::operator>(const QString &s) const +inline bool QLatin1String::operator>(const QString &s) const Q_DECL_NOTHROW { return s < *this; } -inline bool QLatin1String::operator<(const QString &s) const +inline bool QLatin1String::operator<(const QString &s) const Q_DECL_NOTHROW { return s > *this; } -inline bool QLatin1String::operator>=(const QString &s) const +inline bool QLatin1String::operator>=(const QString &s) const Q_DECL_NOTHROW { return s <= *this; } -inline bool QLatin1String::operator<=(const QString &s) const +inline bool QLatin1String::operator<=(const QString &s) const Q_DECL_NOTHROW { return s >= *this; } #if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII) -- cgit v1.2.3 From e19bedc8466a6b8086a0048b7b88c0f6d3fa822f Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Mon, 19 Oct 2015 15:50:41 +0300 Subject: winrt: use correct winapi family defines in mkspecs and system detection WINAPI_FAMILY_APP is deprecated, so use WINAPI_FAMILY_PC_APP instead. Also, open up the phone partition for use on MSVC2015. Change-Id: I7476d71c31395b2914f5a1439e8088341976bf2f Reviewed-by: Maurice Kalinowski --- mkspecs/winrt-arm-msvc2013/qmake.conf | 2 +- mkspecs/winrt-arm-msvc2015/qmake.conf | 2 +- mkspecs/winrt-x64-msvc2015/qmake.conf | 2 +- mkspecs/winrt-x86-msvc2013/qmake.conf | 2 +- mkspecs/winrt-x86-msvc2015/qmake.conf | 2 +- src/corelib/global/qsystemdetection.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mkspecs/winrt-arm-msvc2013/qmake.conf b/mkspecs/winrt-arm-msvc2013/qmake.conf index d1ab60723d..f8b48b0829 100644 --- a/mkspecs/winrt-arm-msvc2013/qmake.conf +++ b/mkspecs/winrt-arm-msvc2013/qmake.conf @@ -6,7 +6,7 @@ include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _MSC_VER=1800 -DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP ARM __ARM__ __arm__ +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP ARM __ARM__ __arm__ QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS diff --git a/mkspecs/winrt-arm-msvc2015/qmake.conf b/mkspecs/winrt-arm-msvc2015/qmake.conf index 44c91a5e80..820f66deb1 100644 --- a/mkspecs/winrt-arm-msvc2015/qmake.conf +++ b/mkspecs/winrt-arm-msvc2015/qmake.conf @@ -6,7 +6,7 @@ include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _MSC_VER=1900 -DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP ARM __ARM__ __arm__ +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__ QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS diff --git a/mkspecs/winrt-x64-msvc2015/qmake.conf b/mkspecs/winrt-x64-msvc2015/qmake.conf index a6c5db6f0f..e3edde78c1 100644 --- a/mkspecs/winrt-x64-msvc2015/qmake.conf +++ b/mkspecs/winrt-x64-msvc2015/qmake.conf @@ -6,7 +6,7 @@ include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32 -DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X64 __X64__ __x64__ +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__ QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS diff --git a/mkspecs/winrt-x86-msvc2013/qmake.conf b/mkspecs/winrt-x86-msvc2013/qmake.conf index 77b906c7d3..3359102e7e 100644 --- a/mkspecs/winrt-x86-msvc2013/qmake.conf +++ b/mkspecs/winrt-x86-msvc2013/qmake.conf @@ -6,7 +6,7 @@ include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _MSC_VER=1800 _WIN32 -DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X86 __X86__ __x86__ +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP X86 __X86__ __x86__ QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS diff --git a/mkspecs/winrt-x86-msvc2015/qmake.conf b/mkspecs/winrt-x86-msvc2015/qmake.conf index dfeaf63e2c..82c6f9bd7f 100644 --- a/mkspecs/winrt-x86-msvc2015/qmake.conf +++ b/mkspecs/winrt-x86-msvc2015/qmake.conf @@ -6,7 +6,7 @@ include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32 -DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X86 __X86__ __x86__ +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__ QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index d19784163a..751c6a9a0e 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -109,7 +109,7 @@ # if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP # define Q_OS_WINPHONE # define Q_OS_WINRT -# elif WINAPI_FAMILY==WINAPI_FAMILY_APP +# elif WINAPI_FAMILY==WINAPI_FAMILY_PC_APP # define Q_OS_WINRT # else # define Q_OS_WIN32 -- cgit v1.2.3 From 2538b53340a4ef1d96b9eb0e43311b1e5ff1c54a Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 8 Oct 2015 11:23:35 +0200 Subject: winrt: Avoid empty section in manifest files If that section is there but empty, the manifest cannot be loaded using the App Manifest Designer in Visual Studio. Task-number: QTBUG-48648 Change-Id: I529eb2f2a690bececcf5c385b8f96e84ece363d6 Reviewed-by: Oswald Buddenhagen Reviewed-by: Maurice Kalinowski --- mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in | 3 +-- mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in | 3 +-- mkspecs/features/winrt/package_manifest.prf | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in index 91353c608b..b02b691f48 100644 --- a/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in +++ b/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in @@ -42,7 +42,6 @@ $${WINRT_MANIFEST.capabilities} - $${WINRT_MANIFEST.dependencies} - + $${WINRT_MANIFEST.dependencies} diff --git a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in index 19deb94675..235fe96794 100644 --- a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in +++ b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in @@ -43,7 +43,6 @@ $${WINRT_MANIFEST.capabilities} - $${WINRT_MANIFEST.dependencies} - + $${WINRT_MANIFEST.dependencies} diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index 0f6f185170..9b4a6672e5 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -125,10 +125,14 @@ # Dependencies are given as a string list. The CRT dependency is added automatically above. # For MSVC2015 the dependencies are added in conjunction with TargetDeviceFamily + # Due to the hard coded dependency on "Windows.Universal" the tag + # is already inside the MSVC2015 manifest. WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies) !isEmpty(WINRT_MANIFEST.dependencies) { + *-msvc2013: MANIFEST_DEPENDENCIES += "" for(DEPENDENCY, WINRT_MANIFEST.dependencies): \ MANIFEST_DEPENDENCIES += " " + *-msvc2013: MANIFEST_DEPENDENCIES += "" WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT) } -- cgit v1.2.3 From 629ceec208ad5fe9f5d201fc42fce611e55c567d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 17 Sep 2015 19:04:42 -0700 Subject: Update qversiontagging.cpp not to use too much assembler magic The only reason I had used them in the first place was because C preprocessor macros cannot call themselves recursively. But the magic was too magic and caused issues with some builds, so let's choose the safer option. Anyway, this solution now works for all ELF architectures, independent of the processor, whereas previously it was restricted to x86 and Linux/ FreeBSD. However, this does not apply to the assembly in qversiontagging.h. Change-Id: I42e7ef1a481840699a8dffff1404f032fc5cacb8 Reviewed-by: Lars Knoll --- mkspecs/features/qt_module.prf | 8 +++- src/corelib/global/global.pri | 28 +----------- src/corelib/global/qversiontagging.cpp | 79 +++++++++++++++++++++------------- 3 files changed, 56 insertions(+), 59 deletions(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 3c0526055c..b623d68767 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -196,10 +196,14 @@ unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { } else { current = Qt_$$QT_MAJOR_VERSION verscript_content = "$$current { *; };" - for(i, 0..$$section(VERSION, ., 1, 1)) { + isEmpty(QT_NAMESPACE): tag_symbol = qt_version_tag + else: tag_symbol = qt_version_tag_$$QT_NAMESPACE + + for(i, 0..$$QT_MINOR_VERSION) { previous = $$current current = Qt_$${QT_MAJOR_VERSION}.$$i - verscript_content += "$$current {} $$previous;" + equals(i, $$QT_MINOR_VERSION): verscript_content += "$$current { $$tag_symbol; } $$previous;" + else: verscript_content += "$$current {} $$previous;" } } write_file($$verscript, verscript_content)|error("Aborting.") diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index eb8600f796..8ecde5a769 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -27,7 +27,8 @@ SOURCES += \ global/qmalloc.cpp \ global/qnumeric.cpp \ global/qlogging.cpp \ - global/qhooks.cpp + global/qhooks.cpp \ + global/qversiontagging.cpp # qlibraryinfo.cpp includes qconfig.cpp INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global @@ -58,28 +59,3 @@ journald { syslog { DEFINES += QT_USE_SYSLOG } - -linux|freebsd { - VERSIONTAGGING_SOURCES = global/qversiontagging.cpp - ltcg|clang { - versiontagging_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) $(INCPATH) - - # Disable LTO, as the global inline assembly may not get processed - versiontagging_compiler.commands += -fno-lto - - # Disable the integrated assembler for Clang, since it can't parse with - # the alternate macro syntax in use in qversiontagging.cpp - clang: versiontagging_compiler.commands += -no-integrated-as - - versiontagging_compiler.commands += -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} - versiontagging_compiler.dependency_type = TYPE_C - versiontagging_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} - versiontagging_compiler.input = VERSIONTAGGING_SOURCES - versiontagging_compiler.variable_out = OBJECTS - versiontagging_compiler.name = compiling[versiontagging] ${QMAKE_FILE_IN} - silent: versiontagging_compiler.commands = @echo compiling[versiontagging] ${QMAKE_FILE_IN} && $$versiontagging_compiler.commands - QMAKE_EXTRA_COMPILERS += versiontagging_compiler - } else { - SOURCES += $$VERSIONTAGGING_SOURCES - } -} diff --git a/src/corelib/global/qversiontagging.cpp b/src/corelib/global/qversiontagging.cpp index 66d3f8d00f..fc81d9bb93 100644 --- a/src/corelib/global/qversiontagging.cpp +++ b/src/corelib/global/qversiontagging.cpp @@ -33,37 +33,54 @@ #include "qglobal.h" -#if defined(Q_CC_GNU) && (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)) && defined(Q_PROCESSOR_X86) && !defined(QT_STATIC) -# define SYM QT_MANGLE_NAMESPACE(qt_version_tag) -# define SSYM QT_STRINGIFY(SYM) +#define SYM QT_MANGLE_NAMESPACE(qt_version_tag) +//#define SSYM QT_STRINGIFY(SYM) -asm( -// ASM macro that makes one ELF versioned symbol -".macro make_versioned_symbol plainsym versionedsym\n" -".globl plainsym\n" -".type plainsym, @object\n" -".size plainsym, 1\n" -".symver plainsym, versionedsym\n" -"plainsym :\n" -".endm\n" - -// ASM macro that makes one ELF versioned symbol qt_version_tag{sep}Qt_{major}.{minor} -// that is an alias to qt_version_tag_{major}_{minor}. -// The {sep} parameter must be @ for all old versions and @@ for the current version. -".macro make_one_tag major minor sep\n" -" make_versioned_symbol " SSYM "_\\major\\()_\\minor, " SSYM "\\sep\\()Qt_\\major\\().\\minor\n" -".endm\n" - -".altmacro\n" -".bss\n" -".set qt_version_major, " QT_STRINGIFY(QT_VERSION) " >> 16\n" // set qt_version_major -".set qt_version_minor, 0\n" // set qt_version_minor to 0 (it will grow to the current) -".rept (" QT_STRINGIFY(QT_VERSION) " >> 8) & 0xff\n" // repeat minor version times (0 to N-1) -" make_one_tag %qt_version_major, %qt_version_minor, @\n" -" .set qt_version_minor, (qt_version_minor + 1)\n" -".endr\n" -" make_one_tag %qt_version_major, %qt_version_minor, @@\n" // call the macro for the current version -" .space 1\n" // variable is 1 byte, value 0 -); +#if defined(Q_CC_GNU) && defined(Q_OF_ELF) +# define make_versioned_symbol2(sym, m, n, separator) \ + Q_CORE_EXPORT extern const char sym ## _ ## m ## _ ## n = 0; \ + asm(".symver " QT_STRINGIFY(sym) "_" QT_STRINGIFY(m) "_" QT_STRINGIFY(n) ", " \ + QT_STRINGIFY(sym) separator "Qt_" QT_STRINGIFY(m) "." QT_STRINGIFY(n)) +#else +# define make_versioned_symbol2(sym, m, n, separator) +#endif +#define make_versioned_symbol(sym, m, n, separator) make_versioned_symbol2(sym, m, n, separator) +extern "C" { +#if QT_VERSION_MINOR > 0 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 0, "@"); +#endif +#if QT_VERSION_MINOR > 1 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 1, "@"); +#endif +#if QT_VERSION_MINOR > 2 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 2, "@"); +#endif +#if QT_VERSION_MINOR > 3 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 3, "@"); +#endif +#if QT_VERSION_MINOR > 4 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 4, "@"); #endif +#if QT_VERSION_MINOR > 5 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 5, "@"); +#endif +#if QT_VERSION_MINOR > 6 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 6, "@"); +#endif +#if QT_VERSION_MINOR > 7 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 7, "@"); +#endif +#if QT_VERSION_MINOR > 8 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 8, "@"); +#endif +#if QT_VERSION_MINOR > 9 +make_versioned_symbol(SYM, QT_VERSION_MAJOR, 9, "@"); +#endif +#if QT_VERSION_MINOR > 10 +# error "Please update this file with more Qt versions." +#endif + +// the default version: +make_versioned_symbol(SYM, QT_VERSION_MAJOR, QT_VERSION_MINOR, "@@"); +} -- cgit v1.2.3 From bf929938293abd398c2c6f3e88c4774e56f75efa Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 2 Jun 2015 11:30:57 -0700 Subject: Add an automatic use of the ELF-versioned QtCore symbol See the comment in the header for an explanation of what it does. This trick is enabled for every single .o that is compiled, unless QT_NO_VERSION_TAGGING is defined. The assembly expands to a COMDAT section, which is mergeable by the linker, so only one copy of the output is present in the ELF module. This is enabled only for Linux and x86 / x86-64 / x32 due to the requirement of writing assembly and relocations, so it needs to be tested on each platform, which I have not done. It might work on Solaris/x86, but again it requires testing. Support for other architectures requires different assembly output and relocations and can be added as needed, but they are not as important since this trick is has most value on desktop systems. Change-Id: I049a653beeb5454c9539ffff13e3ff5782a8cb86 Reviewed-by: Oswald Buddenhagen Reviewed-by: Rex Dieter Reviewed-by: Thiago Macieira --- src/corelib/global/global.pri | 3 +- src/corelib/global/qglobal.h | 1 + src/corelib/global/qversiontagging.h | 86 ++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/corelib/global/qversiontagging.h diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 8ecde5a769..aa4945f90e 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -17,7 +17,8 @@ HEADERS += \ global/qisenum.h \ global/qtypetraits.h \ global/qflags.h \ - global/qhooks_p.h + global/qhooks_p.h \ + global/qversiontagging.h SOURCES += \ global/archdetect.cpp \ diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 81ab3bcb9e..d86e410194 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1126,6 +1126,7 @@ QT_END_NAMESPACE #include #include #include +#include #endif /* __cplusplus */ diff --git a/src/corelib/global/qversiontagging.h b/src/corelib/global/qversiontagging.h new file mode 100644 index 0000000000..22e6e82a58 --- /dev/null +++ b/src/corelib/global/qversiontagging.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2015 Intel Corporation. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// qglobal.h includes this header, so keep it outside of our include guards +#include + +#if !defined(QVERSIONTAGGING_H) +#define QVERSIONTAGGING_H + +QT_BEGIN_NAMESPACE + +/* + * Ugly hack warning and explanation: + * + * This file causes all ELF modules, be they libraries or applications, to use the + * qt_version_tag symbol that is present in QtCore. Such symbol is versioned, + * so the linker will automatically pull the current Qt version and add it to + * the ELF header of the library/application. The assembly produces one section + * called ".qtversion" containing two pointer-sized values. The first is a + * relocation to the qt_version_tag symbol (which is what causes the ELF + * version to get used). The second value is the current Qt version at the time + * of compilation. + * + * There will only be one copy of the section in the output library or application. + */ + +#if defined(QT_BUILD_CORE_LIB) || defined(QT_BOOTSTRAPPED) || defined(QT_NO_VERSION_TAGGING) +// don't make tags in QtCore, bootstrapped systems or if the user asked not to +#elif defined(Q_CC_GNU) +# if defined(Q_PROCESSOR_X86) && (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD_KERNEL)) +# ifdef __LP64__ +# define QT_VERSION_TAG_RELOC(sym) ".quad " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOTPCREL\n" +# elif defined(Q_PROCESSOR_X86_64) // x32 +# define QT_VERSION_TAG_RELOC(sym) ".long " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOTPCREL\n" +# else // x86 +# define QT_VERSION_TAG_RELOC(sym) ".long " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOT\n" +# endif +# define QT_VERSION_TAG(sym) \ + asm ( \ + ".section .qtversion, \"aG\", @progbits, qt_version_tag, comdat\n" \ + ".align 8\n" \ + QT_VERSION_TAG_RELOC(sym) \ + ".long " QT_STRINGIFY(QT_VERSION) "\n" \ + ".align 8\n" \ + ".previous" \ + ) +# endif +#endif + +#if defined(QT_VERSION_TAG) +QT_VERSION_TAG(qt_version_tag); +#endif + +QT_END_NAMESPACE + +#endif // QVERSIONTAGGING_H -- cgit v1.2.3 From 2d8801a9622ca47e377dfb7e1cb73f1809c764ed Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Sep 2015 20:06:05 +0200 Subject: support relative paths in QMAKE_RPATHDIR ... and make use of it in qt.prf. [ChangeLog][qmake][Unix] Added support for relative paths in QMAKE_RPATHDIR. Note that this technically breaks backwards compatibility, as relative paths were previously silently resolved against $$_PRO_FILE_PWD_. This was not documented and seems rather useless, so i'm not worried. Change-Id: I855042a8962ab34ad4617899a5b9825af0087f8a Reviewed-by: Joerg Bornemann Reviewed-by: Jake Petroules Reviewed-by: Oswald Buddenhagen --- mkspecs/common/linux.conf | 3 +++ mkspecs/common/mac.conf | 3 +++ mkspecs/features/qt.prf | 8 +------- qmake/doc/src/qmake-manual.qdoc | 23 +++++++++++++++++++++++ qmake/generators/unix/unixmake.cpp | 19 ++++++++++++++++--- 5 files changed, 46 insertions(+), 10 deletions(-) diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index b98d9bdf2d..143df704b1 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -10,6 +10,9 @@ QMAKE_CFLAGS_THREAD += -D_REENTRANT QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections +QMAKE_LFLAGS_REL_RPATH = -Wl,-z,origin +QMAKE_REL_RPATH_BASE = $ORIGIN + QMAKE_INCDIR = QMAKE_LIBDIR = QMAKE_INCDIR_X11 = diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf index d80b41c74b..ad3c638a6f 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -22,6 +22,9 @@ QMAKE_FIX_RPATH = install_name_tool -id QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip +QMAKE_LFLAGS_REL_RPATH = +QMAKE_REL_RPATH_BASE = @loader_path + QMAKE_LIBS_DYNLOAD = QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL QMAKE_LIBS_THREAD = diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index d416a8955a..d200467571 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -167,17 +167,11 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") } else { binpath = $$target.path } - rpath = @loader_path } else { - QMAKE_LFLAGS += -Wl,-z,origin binpath = $$target.path - rpath = $ORIGIN } # NOT the /dev property, as INSTALLS use host paths - relpath = $$relative_path($$[QT_INSTALL_LIBS], $$binpath) - !equals(relpath, .): \ - rpath = $$rpath/$$relpath - QMAKE_RPATHDIR += $$rpath + QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$binpath) } else { QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev] } diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index cfa288da82..535b500fd3 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1845,6 +1845,22 @@ The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LFLAGS_REL_RPATH + + Specifies the linker flags needed to enable relative paths in + \l{QMAKE_RPATHDIR}. + + The value of this variable is typically handled by + qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + + \section1 QMAKE_REL_RPATH_BASE + + Specifies the string the dynamic linker understands to be the + location of the referring executable or library. + + The value of this variable is typically handled by + qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_LFLAGS_RPATHLINK Specifies the linker flags needed to use the values from @@ -2095,6 +2111,13 @@ executable at link time so that the paths will be preferentially searched at runtime. + When relative paths are specified, qmake will mangle them into a form + understood by the dynamic linker to be relative to the location of + the referring executable or library. + This is supported only by some platforms (currently Linux and + Darwin-based ones) and is detectable by checking whether + \l{QMAKE_REL_RPATH_BASE} is set. + \section1 QMAKE_RPATHLINKDIR Specifies a list of library paths for the static linker to search for implicit diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 1d9ebb35e3..57c0a97228 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -125,10 +125,23 @@ UnixMakefileGenerator::init() const ProStringList &rpathdirs = project->values("QMAKE_RPATHDIR"); for (int i = 0; i < rpathdirs.size(); ++i) { QString rpathdir = rpathdirs[i].toQString(); - if (rpathdir.length() > 1 && rpathdir.at(0) == '$' && rpathdir.at(1) != '(') + if (rpathdir.length() > 1 && rpathdir.at(0) == '$' && rpathdir.at(1) != '(') { rpathdir.replace(0, 1, "\\$$"); // Escape from make and the shell - else if (!rpathdir.startsWith('@')) - rpathdir = QFileInfo(rpathdir).absoluteFilePath(); + } else if (!rpathdir.startsWith('@') && fileInfo(rpathdir).isRelative()) { + QString rpathbase = project->first("QMAKE_REL_RPATH_BASE").toQString(); + if (rpathbase.isEmpty()) { + fprintf(stderr, "Error: This platform does not support relative paths in QMAKE_RPATHDIR (%s)\n", + rpathdir.toLatin1().constData()); + continue; + } + if (rpathbase.startsWith('$')) + rpathbase.replace(0, 1, "\\$$"); // Escape from make and the shell + if (rpathdir == ".") + rpathdir = rpathbase; + else + rpathdir.prepend(rpathbase + '/'); + project->values("QMAKE_LFLAGS").insertUnique(project->values("QMAKE_LFLAGS_REL_RPATH")); + } project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(rpathdir); } } -- cgit v1.2.3 From 8e846b337bb5e755d38aef3ebc8123ed1c9bd696 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 Sep 2015 20:35:10 +0200 Subject: don't try to use relative rpaths on platforms that don't support it Change-Id: I8224d429d71ccc829beb1addf592806d2edaa87b Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index d200467571..d0d6bb27ce 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -155,7 +155,7 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") !no_qt_rpath:!static:contains(QT_CONFIG, rpath):!contains(QT_CONFIG, static):\ contains(qt_module_deps, core) { - relative_qt_rpath:contains(INSTALLS, target):\ + relative_qt_rpath:!isEmpty(QMAKE_LFLAGS_REL_RPATH):contains(INSTALLS, target):\ isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) { mac { if(equals(TEMPLATE, app):app_bundle)|\ -- cgit v1.2.3 From fff3101bc6bbb2f8433c7edde80f77b6efb0ec39 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 2 Jun 2015 11:42:07 -0700 Subject: Place classes from private headers in the Qt_5_PRIVATE_API ELF version This way, it's possible to tell which applications and libraries depend on the Qt private API and of which Qt library. Linux distributions can use this information to decide which applications need to be recompiled every time Qt itself is rebuilt. This is done by scanning all class and struct definitions in the private headers (we've already got the list from syncqt). I opted to add a new script instead of modifying syncqt because then this can run in parallel with the rest of the compilation, as opposed to during qmake time. Another advantage is that it catches modifications to the headers in between qmake executions. Since this is already Unix specific, it should be no problem to use Perl. This solution is limited to use of non-inline symbols of classes declared in private headers. It will not catch free variables (such as qsimd_p.h's qt_cpu_features), use of inlined functions or just plain use of a class/struct for accessing its data members. However, this is already better than nothing and should help Linux distributions quite a lot. And there's no way to catch the latter issue anyway. Change-Id: I049a653beeb5454c9539ffff13e3fff36400ebbd Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- mkspecs/features/data/unix/findclasslist.pl | 59 +++++++++++++++++++++++++++++ mkspecs/features/qt_module.prf | 15 +++++++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 mkspecs/features/data/unix/findclasslist.pl diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl new file mode 100644 index 0000000000..9113b4921c --- /dev/null +++ b/mkspecs/features/data/unix/findclasslist.pl @@ -0,0 +1,59 @@ +#!/usr/bin/env perl +############################################################################# +## +## Copyright (C) 2015 Intel Corporation +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the build configuration tools of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +use strict; +my $syntax = "findclasslist.pl [private header list]\n" . + "Replaces \@CLASSLIST\@ with the classes found in the header files\n"; +$\ = $/; +while () { + chomp; + unless (/\@CLASSLIST\@/) { + print; + next; + } + + # Replace @CLASSLIST@ with the class list + for my $header (@ARGV) { + open HDR, "<$header" or die("Could not open header $header: $!"); + my $comment = " /* $header */"; + while (my $line = ) { + # Match a struct or class declaration, but not a forward declaration + $line =~ /^(?:struct|class) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next; + print $comment if $comment; + printf " *%d%s*;\n", length $1, $1; + $comment = 0; + } + close HDR; + } +} diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index b623d68767..10911fa6df 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -194,8 +194,11 @@ unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { internal_module { verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };" } else { + verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \ + " qt_private_api_tag*;" "@CLASSLIST@" "};" + current = Qt_$$QT_MAJOR_VERSION - verscript_content = "$$current { *; };" + verscript_content += "$$current { *; };" isEmpty(QT_NAMESPACE): tag_symbol = qt_version_tag else: tag_symbol = qt_version_tag_$$QT_NAMESPACE @@ -205,6 +208,16 @@ unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { equals(i, $$QT_MINOR_VERSION): verscript_content += "$$current { $$tag_symbol; } $$previous;" else: verscript_content += "$$current {} $$previous;" } + + # Add a post-processing step to replace the @CLASSLIST@ + verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $^ > $@ + verscriptprocess.target = $$verscript + verscriptprocess.depends = $${verscript}.in + for(header, SYNCQT.PRIVATE_HEADER_FILES): \ + verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header + QMAKE_EXTRA_TARGETS += verscriptprocess + PRE_TARGETDEPS += $$verscript + verscript = $${verscript}.in } write_file($$verscript, verscript_content)|error("Aborting.") unset(current) -- cgit v1.2.3 From 04fe7af33fdb3c50171b769baa43195e2613a802 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 20 Oct 2015 10:36:57 +0200 Subject: Doc: Improve selection of offline template type Qt 5.6 now includes a version of the offline documentation template with simplified CSS suited for rendering HTML with a QTextBrowser backend. Select the template in qt-html-templates-offline.qdocconf, instead of the higher-level qt-module-defaults-offline.qdocconf. This is better because many projects external to qt5 (including Qt Creator) do not use qt-module-* includes. This way, we can control the template selection for all projects from a config file. Change-Id: I766af422d829f3c9519c5a45093473175363d600 Reviewed-by: Martin Smith --- doc/global/qt-html-templates-offline-simple.qdocconf | 10 +--------- doc/global/qt-html-templates-offline.qdocconf | 5 +++++ doc/global/qt-module-defaults-offline.qdocconf | 5 +---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/doc/global/qt-html-templates-offline-simple.qdocconf b/doc/global/qt-html-templates-offline-simple.qdocconf index b19bdd513f..cd924c64e3 100644 --- a/doc/global/qt-html-templates-offline-simple.qdocconf +++ b/doc/global/qt-html-templates-offline-simple.qdocconf @@ -1,16 +1,8 @@ -#include standard set of HTML header and footer. -include(html-config.qdocconf) -include(html-header-offline.qdocconf) -include(html-footer.qdocconf) - -# Uncomment if navigation bar is not wanted -#HTML.nonavigationbar = "true" - # Specify a custom CSS file used by this template HTML.stylesheets += template/style/offline-simple.css qhp.extraFiles += style/offline-simple.css -# override the header styles +# Override the header styles HTML.headerstyles = \ " \n" \ "