From d014bb648f3e8499a87c180274af5cc7e16e72de Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Thu, 1 Dec 2011 12:42:47 +0100 Subject: Backport writingSystems support code for Cocoa from Qt 5 Mark writingSystems support based on languages from Core Text. Task-number: QTBUG-20996 Reviewed-by: Morten Sorvig --- src/gui/text/qfontdatabase_mac.cpp | 54 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp index 81500c7..a96224c 100644 --- a/src/gui/text/qfontdatabase_mac.cpp +++ b/src/gui/text/qfontdatabase_mac.cpp @@ -84,6 +84,46 @@ qDebug() << "first char" << hex << unicodeRange[0]; for (int i = 0; i < systems.count(); ++i) family->writingSystems[systems.at(i)] = QtFontFamily::Supported; } +#else +// this could become a list of all languages used for each writing +// system, instead of using the single most common language. +static const char *languageForWritingSystem[] = { + 0, // Any + "en", // Latin + "el", // Greek + "ru", // Cyrillic + "hy", // Armenian + "he", // Hebrew + "ar", // Arabic + "syr", // Syriac + "div", // Thaana + "hi", // Devanagari + "bn", // Bengali + "pa", // Gurmukhi + "gu", // Gujarati + "or", // Oriya + "ta", // Tamil + "te", // Telugu + "kn", // Kannada + "ml", // Malayalam + "si", // Sinhala + "th", // Thai + "lo", // Lao + "bo", // Tibetan + "my", // Myanmar + "ka", // Georgian + "km", // Khmer + "zh-cn", // SimplifiedChinese + "zh-tw", // TraditionalChinese + "ja", // Japanese + "ko", // Korean + "vi", // Vietnamese + 0, // Symbol + 0, // Ogham + 0, // Runic + 0 // N'Ko +}; +enum { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) }; #endif static void initializeDb() @@ -107,8 +147,18 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) { QCFString family_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL); QCFString style_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL); QtFontFamily *family = db->family(family_name, true); - for(int ws = 1; ws < QFontDatabase::WritingSystemsCount; ++ws) - family->writingSystems[ws] = QtFontFamily::Supported; + + if (QCFType languages = (CFArrayRef) CTFontDescriptorCopyAttribute(font, kCTFontLanguagesAttribute)) { + CFIndex length = CFArrayGetCount(languages); + for (int i = 1; i < LanguageCount; ++i) { + if (!languageForWritingSystem[i]) + continue; + QCFString lang = CFStringCreateWithCString(NULL, languageForWritingSystem[i], kCFStringEncodingASCII); + if (CFArrayContainsValue(languages, CFRangeMake(0, length), lang)) + family->writingSystems[i] = QtFontFamily::Supported; + } + } + QtFontFoundry *foundry = family->foundry(foundry_name, true); QtFontStyle::Key styleKey; -- cgit v0.12 From bc25cfdd65452efa226cbd544c9ae9803eb6748a Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Thu, 1 Dec 2011 14:15:00 +0100 Subject: Fix stretched font positions in Lion In Mac OS X 10.7 and up, According to http://lists.apple.com/archives/Coretext-dev/2011/Nov/msg00006.html we need to manually apply transform matrix to advances if text matrix as been applied, CTRunGetPositions won't apply it. Task-number: QTBUG-22825 Reviewed-by: Eskil --- src/gui/text/qfontengine_coretext.mm | 10 ++++++++-- src/gui/text/qfontengine_coretext_p.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm index 153451e..154c44f 100644 --- a/src/gui/text/qfontengine_coretext.mm +++ b/src/gui/text/qfontengine_coretext.mm @@ -97,6 +97,7 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const QCFString &name, const if (fontDef.stretch != 100) { transform = CGAffineTransformMakeScale(float(fontDef.stretch) / float(100), 1); } + transformAdvances = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7; QCFType descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pixelSize); QCFType baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pixelSize, &transform); @@ -225,6 +226,7 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay Q_ASSERT((CTRunGetStatus(run) & kCTRunStatusRightToLeft) == rtl); CFRange stringRange = CTRunGetStringRange(run); + CGAffineTransform textMatrix = CTRunGetTextMatrix(run); int prepend = 0; #if MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_5 UniChar beginGlyph = CFStringGetCharacterAtIndex(cfstring, stringRange.location); @@ -319,9 +321,13 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay for (CFIndex i = 0; i < glyphCount - 1; ++i) { int idx = rtlOffset + rtlSign * i; outGlyphs[idx] = tmpGlyphs[i] | fontIndex; - outAdvances_x[idx] = QFixed::fromReal(tmpPoints[i + 1].x - tmpPoints[i].x); + CGSize advance = CGSizeMake(tmpPoints[i + 1].x - tmpPoints[i].x, tmpPoints[i].y - tmpPoints[i + 1].y); + if (transformAdvances) + advance = CGSizeApplyAffineTransform(advance, textMatrix); + + outAdvances_x[idx] = QFixed::fromReal(advance.width); // Use negative y advance for flipped coordinate system - outAdvances_y[idx] = QFixed::fromReal(tmpPoints[i].y - tmpPoints[i + 1].y); + outAdvances_y[idx] = QFixed::fromReal(advance.height); if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { outAdvances_x[idx] = outAdvances_x[idx].round(); diff --git a/src/gui/text/qfontengine_coretext_p.h b/src/gui/text/qfontengine_coretext_p.h index 4bd80be..495e638 100644 --- a/src/gui/text/qfontengine_coretext_p.h +++ b/src/gui/text/qfontengine_coretext_p.h @@ -146,6 +146,7 @@ private: mutable QCFType attributeDict; CGAffineTransform transform; friend class QFontDialogPrivate; + bool transformAdvances; }; CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef); -- cgit v0.12 From 8ed37d9bba6e2899724d13bd3ba8911c505b1c8c Mon Sep 17 00:00:00 2001 From: mread Date: Thu, 8 Dec 2011 14:00:46 +0000 Subject: Symbian: improving diagnostics for QWaitCondition If a QWaitCondition was deleted while it was waiting, it would crash in the wait() function while trying to use its internal mutex. This crash is not particularly obvious in its cause. QWaitCondition can detect this delete-while-waiting case, issue appropriate warnings and avoid a crash in its internal state. In the app crash case where this problem was found, there is a further crash after this one due to an externally deleted mutex. The app is clearly at fault. But at least there's now more debug info about what the app is doing wrong. Task-number: ou1cimx1#946509 partial fix Reviewed-by: Shane Kearns --- src/corelib/thread/qwaitcondition_symbian.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/thread/qwaitcondition_symbian.cpp b/src/corelib/thread/qwaitcondition_symbian.cpp index c6414e8..ed1011c 100644 --- a/src/corelib/thread/qwaitcondition_symbian.cpp +++ b/src/corelib/thread/qwaitcondition_symbian.cpp @@ -112,7 +112,10 @@ public: --wakeups; } - mutex.Signal(); + // if err is KErrGeneral it signals that the RCondVar is closed along with the mutex and that this has been deleted + // we must not access any member variables in this case + if (err != KErrGeneral) + mutex.Signal(); if (err && err != KErrTimedOut) report_error(err, "QWaitCondition::wait()", "cv wait"); -- cgit v0.12 From 21eca49954afb0d98d616d475c1c09ca00606af8 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 9 Dec 2011 11:07:01 +0200 Subject: Symbian: Fix double deletion of selected text when using predictive The selected text replacement was done incorrectly, leading to removal of additional text equal to the lenght of the original selection. Fixed by not doing any explicit replacement, but instead faking a preedit character that is immediately removed, which triggers selected text removal in the input method handling of the underlying edit control. Task-number: ou1cimx1#938665 Reviewed-by: Sami Merila --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 26 +++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 3bcac62..02bc4d0 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -1388,15 +1388,25 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText, // but FEP requires that selected text is always removed at StartFepInlineEditL. // Let's remove the selected text if aInitialInlineText is empty and there is selected text if (m_preeditString.isEmpty()) { - int anchor = w->inputMethodQuery(Qt::ImAnchorPosition).toInt(); - int cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); - int replacementLength = qAbs(cursorPos-anchor); - if (replacementLength > 0) { - int replacementStart = cursorPos < anchor ? 0 : -replacementLength; - QList clearSelectionAttributes; - QInputMethodEvent clearSelectionEvent(QLatin1String(""), clearSelectionAttributes); - clearSelectionEvent.setCommitString(QLatin1String(""), replacementStart, replacementLength); + QString currentSelection = w->inputMethodQuery(Qt::ImCurrentSelection).toString(); + if (!currentSelection.isEmpty()) { + // To correctly remove selection in cases where we have multiple lines selected, + // we must rely on the control's own selection removal mechanism, as surrounding + // text contains only one line. It's also impossible to accurately detect + // these overselection cases as the anchor and cursor positions are limited to the + // surrounding text. + // Solution is to clear the selection by faking a preedit. Use a dummy character + // from the current selection just to be safe. + QString dummyText = currentSelection.left(1); + QList attributes; + QInputMethodEvent clearSelectionEvent(dummyText, attributes); + clearSelectionEvent.setCommitString(QLatin1String(""), 0, 0); sendEvent(clearSelectionEvent); + + // Now that selection is taken care of, clear the fake preedit. + QInputMethodEvent clearPreeditEvent(QLatin1String(""), attributes); + clearPreeditEvent.setCommitString(QLatin1String(""), 0, 0); + sendEvent(clearPreeditEvent); } } -- cgit v0.12 From 5fbd3e1aacf789cc46fef57d8726333ee8a00e03 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 9 Dec 2011 12:12:28 +0200 Subject: Symbian: Fix a case sensitivity issue with QMAKE_EXTRA_COMPILERS The case of the drive letter generated to the absolute paths seems to have changed between 4.7 and 4.8, which led into regression with projects that utilize $$PWD in target name, as that still returns the path with drive letter in same case as previously. Fixed the critical check to be case insensitive in windows. Task-number: ou1cimx1#951456 Reviewed-by: Murray Read --- qmake/generators/symbian/symmake_sbsv2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index cc32f8d..5077be5 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -650,7 +650,11 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t foreach(QString targetItem, project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + item)) { // Make sure targetpath is absolute QString absoluteTarget = QDir::cleanPath(outputDir.absoluteFilePath(targetItem)); +#if defined(Q_OS_WIN) + if (allPreDeps.contains(absoluteTarget, Qt::CaseInsensitive)) { +#else if (allPreDeps.contains(absoluteTarget)) { +#endif QStringList deps = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + item + targetItem); QString commandItem = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + item + targetItem).join(" "); -- cgit v0.12 From 54613aec3bdac668d198923814873a9e622ad675 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 9 Dec 2011 14:40:29 +0200 Subject: Fix window surface config on OpenGL graphics system. QtOpenGL uses 16-bit configs by default but on Symbian it should use 32-bit config. Task-number: QTBUG-23082 Task-number: ou1cimx1#951223 Reviewed-by: Murray Read --- src/opengl/qgl_egl.cpp | 20 ++++++++++++++++++++ src/opengl/qgl_symbian.cpp | 21 +++++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 0b96350..21047d7 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -64,6 +64,25 @@ void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLForma int stencilSize = glFormat.stencilBufferSize(); int sampleCount = glFormat.samples(); +#ifdef Q_OS_SYMBIAN + // on Symbian we prefer 32-bit configs + if (glFormat.alpha() && alphaSize <= 0) + alphaSize = 8; + if (glFormat.depth() && depthSize <= 0) + depthSize = 24; + if (glFormat.stencil() && stencilSize <= 0) + stencilSize = 8; + if (glFormat.sampleBuffers() && sampleCount <= 0) + sampleCount = 1; + + redSize = redSize > 0 ? redSize : 8; + greenSize = greenSize > 0 ? greenSize : 8; + blueSize = blueSize > 0 ? blueSize : 8; + alphaSize = alphaSize > 0 ? alphaSize : 8; + depthSize = depthSize > 0 ? depthSize : 24; + stencilSize = stencilSize > 0 ? stencilSize : 8; + sampleCount = sampleCount > 0 ? sampleCount : 4; +#else // QGLFormat uses a magic value of -1 to indicate "don't care", even when a buffer of that // type has been requested. So we must check QGLFormat's booleans too if size is -1: if (glFormat.alpha() && alphaSize <= 0) @@ -101,6 +120,7 @@ void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLForma depthSize = depthSize > 0 ? depthSize : 0; stencilSize = stencilSize > 0 ? stencilSize : 0; sampleCount = sampleCount > 0 ? sampleCount : 0; +#endif eglProperties.setValue(EGL_RED_SIZE, redSize); eglProperties.setValue(EGL_GREEN_SIZE, greenSize); diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp index 0148304..7d343f6 100644 --- a/src/opengl/qgl_symbian.cpp +++ b/src/opengl/qgl_symbian.cpp @@ -181,14 +181,19 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as d->ownsEglContext = true; d->eglContext->setApi(QEgl::OpenGL); - // Allow apps to override ability to use multisampling by setting an environment variable. Eg: - // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); - // Added to allow camera app to start with limited memory. - if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) { - // Most likely we have hw support for multisampling - // so let's enable it. - d->glFormat.setSampleBuffers(1); - d->glFormat.setSamples(4); + if (d->glFormat.samples() == EGL_DONT_CARE) { + // Allow apps to override ability to use multisampling by setting an environment variable. Eg: + // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); + // Added to allow camera app to start with limited memory. + if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) { + // Most likely we have hw support for multisampling + // so let's enable it. + d->glFormat.setSampleBuffers(1); + d->glFormat.setSamples(4); + } else { + d->glFormat.setSampleBuffers(0); + d->glFormat.setSamples(1); + } } // If the device is a widget with WA_TranslucentBackground set, make sure the glFormat -- cgit v0.12 From 09449825551798a09c2bf18daea18e8e2abe93bc Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 12 Dec 2011 13:10:28 +0000 Subject: Revert "Fix memory leaks in OpenVG and OpenGL resource pools" This reverts commit 8752faf0564bed86396b01529dc8ef5064150f4c. Also Revert "Fix def files" This reverts commit d2a3b9ee8c9329cac96b5e509df0e6a69dbef91c. This was found to cause a crash in QMLGallery app. It is not necessary to delete these resource pools at app exit, as the OS should automatically release the resources at this point. Reviewed-by: Jani Hautakangas --- src/opengl/qgltexturepool.cpp | 6 ++++-- src/openvg/qvgimagepool.cpp | 13 +++++++++++-- src/openvg/qvgimagepool_p.h | 4 ++++ src/s60installs/bwins/QtOpenVGu.def | 2 +- src/s60installs/eabi/QtOpenVGu.def | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp index d19b1db..9ad66f2 100644 --- a/src/opengl/qgltexturepool.cpp +++ b/src/opengl/qgltexturepool.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE Q_OPENGL_EXPORT extern QGLWidget* qt_gl_share_widget(); -Q_GLOBAL_STATIC(QGLTexturePool, qt_gl_texture_pool) +static QGLTexturePool *qt_gl_texture_pool = 0; class QGLTexturePoolPrivate { @@ -69,7 +69,9 @@ QGLTexturePool::~QGLTexturePool() QGLTexturePool *QGLTexturePool::instance() { - return qt_gl_texture_pool(); + if (!qt_gl_texture_pool) + qt_gl_texture_pool = new QGLTexturePool(); + return qt_gl_texture_pool; } GLuint QGLTexturePool::createTexture(GLenum target, diff --git a/src/openvg/qvgimagepool.cpp b/src/openvg/qvgimagepool.cpp index cd1caf4..3a187b0 100644 --- a/src/openvg/qvgimagepool.cpp +++ b/src/openvg/qvgimagepool.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QVGImagePool, qt_vg_image_pool) +static QVGImagePool *qt_vg_image_pool = 0; class QVGImagePoolPrivate { @@ -66,7 +66,16 @@ QVGImagePool::~QVGImagePool() QVGImagePool *QVGImagePool::instance() { - return qt_vg_image_pool(); + if (!qt_vg_image_pool) + qt_vg_image_pool = new QVGImagePool(); + return qt_vg_image_pool; +} + +void QVGImagePool::setImagePool(QVGImagePool *pool) +{ + if (qt_vg_image_pool != pool) + delete qt_vg_image_pool; + qt_vg_image_pool = pool; } VGImage QVGImagePool::createTemporaryImage(VGImageFormat format, diff --git a/src/openvg/qvgimagepool_p.h b/src/openvg/qvgimagepool_p.h index e4fd4e1..07c57bf 100644 --- a/src/openvg/qvgimagepool_p.h +++ b/src/openvg/qvgimagepool_p.h @@ -69,6 +69,10 @@ public: static QVGImagePool *instance(); + // This function can be used from system-specific graphics system + // plugins to alter the image allocation strategy. + static void setImagePool(QVGImagePool *pool); + // Create a new VGImage from the pool with the specified parameters // that is not associated with a pixmap. The VGImage is returned to // the pool when releaseImage() is called. diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def index dc1ddce..547931e 100644 --- a/src/s60installs/bwins/QtOpenVGu.def +++ b/src/s60installs/bwins/QtOpenVGu.def @@ -159,7 +159,7 @@ EXPORTS ?hibernate@QVGImagePool@@UAEXXZ @ 158 NONAME ; void QVGImagePool::hibernate(void) ?qt_vg_destroy_context@@YAXPAVQEglContext@@H@Z @ 159 NONAME ; void qt_vg_destroy_context(class QEglContext *, int) ??0QVGImagePool@@QAE@XZ @ 160 NONAME ; QVGImagePool::QVGImagePool(void) - ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ABSENT ; void QVGImagePool::setImagePool(class QVGImagePool *) + ?setImagePool@QVGImagePool@@SAXPAV1@@Z @ 161 NONAME ; void QVGImagePool::setImagePool(class QVGImagePool *) ?pixmapLRU@QVGImagePool@@IAEPAVQVGPixmapData@@XZ @ 162 NONAME ; class QVGPixmapData * QVGImagePool::pixmapLRU(void) ?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int) ?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void) diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def index f87c71d..a66df98 100644 --- a/src/s60installs/eabi/QtOpenVGu.def +++ b/src/s60installs/eabi/QtOpenVGu.def @@ -176,7 +176,7 @@ EXPORTS _ZN12QVGImagePool11detachImageEP13QVGPixmapData @ 175 NONAME _ZN12QVGImagePool12reclaimSpaceE13VGImageFormatllP13QVGPixmapData @ 176 NONAME _ZN12QVGImagePool12releaseImageEP13QVGPixmapDatam @ 177 NONAME - _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME ABSENT + _ZN12QVGImagePool12setImagePoolEPS_ @ 178 NONAME _ZN12QVGImagePool13removeFromLRUEP13QVGPixmapData @ 179 NONAME _ZN12QVGImagePool15moveToHeadOfLRUEP13QVGPixmapData @ 180 NONAME _ZN12QVGImagePool20createImageForPixmapE13VGImageFormatllmP13QVGPixmapData @ 181 NONAME -- cgit v0.12 From 214ba9e83a99bdd750510d83e1743b7ce62d9a2b Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 9 Dec 2011 11:49:50 +0000 Subject: Fix null pointer dereference in NTLM authentication If NTLM authentication is required for the URL with an empty path, then QNetworkAuthenticationCache::findClosestMatch(url.path()) returns 0. e.g. "http://10.1.2.3". Return a default constructed credential in this case. Change-Id: I84ad3b308ee3f74fbbac9ad0f11dbdc66047b50b Reviewed-by: Robin Burchell Reviewed-by: Martin Petersson (cherry picked from commit b830c9cededf995fab1b0919a81658ceaec8d422) --- src/network/access/qnetworkaccessauthenticationmanager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/network/access/qnetworkaccessauthenticationmanager.cpp b/src/network/access/qnetworkaccessauthenticationmanager.cpp index 1b15cf9..b618ccc 100644 --- a/src/network/access/qnetworkaccessauthenticationmanager.cpp +++ b/src/network/access/qnetworkaccessauthenticationmanager.cpp @@ -283,9 +283,12 @@ QNetworkAccessAuthenticationManager::fetchCachedCredentials(const QUrl &url, QNetworkAuthenticationCache *auth = static_cast(authenticationCache.requestEntryNow(cacheKey)); - QNetworkAuthenticationCredential cred = *auth->findClosestMatch(url.path()); + QNetworkAuthenticationCredential *cred = auth->findClosestMatch(url.path()); + QNetworkAuthenticationCredential ret; + if (cred) + ret = *cred; authenticationCache.releaseEntry(cacheKey); - return cred; + return ret; } void QNetworkAccessAuthenticationManager::clearCache() -- cgit v0.12 From 43d4faf686da7d553171d7c8894c2825b4572dd6 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 9 Dec 2011 12:06:04 +0000 Subject: Fix NTLM authentication with email address When using "user@dns-domain" for NTLM authentication, the whole string should be sent as the username, and the domain should be set to an empty string. The domain sent by the server is still reflected if the username does not contain an '@' character. Manually tested using MS IIS on a domain-joined PC. Task-number: QTBUG-19894 Task-number: ou1cimx1#949951 Change-Id: Ie1f81172e71cb7cce7b8c909062be990c24aea47 Reviewed-by: Martin Petersson (cherry picked from commit f74ff46c7a333d771b07d8ff38df10d9fd13bbcf) --- src/network/kernel/qauthenticator.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 0423e22..7b63567 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -220,12 +220,6 @@ void QAuthenticator::setUser(const QString &user) d->userDomain = user.left(separatorPosn); d->extractedUser = user.mid(separatorPosn + 1); d->user = user; - } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) { - //domain name is present - d->realm.clear(); - d->userDomain = user.mid(separatorPosn + 1); - d->extractedUser = user.left(separatorPosn); - d->user = user; } else { d->extractedUser = user; d->user = user; @@ -1381,8 +1375,9 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas int offset = QNtlmPhase3BlockBase::Size; Q_ASSERT(QNtlmPhase3BlockBase::Size == sizeof(QNtlmPhase3BlockBase)); - - if(ctx->userDomain.isEmpty()) { + + // for kerberos style user@domain logins, NTLM domain string should be left empty + if (ctx->userDomain.isEmpty() && !ctx->extractedUser.contains(QLatin1Char('@'))) { offset = qEncodeNtlmString(pb.domain, offset, ch.targetNameStr, unicode); pb.domainStr = ch.targetNameStr; } else { -- cgit v0.12 From 33f1cc91fad5915cb732ed371288147fb82157f8 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 13 Dec 2011 12:02:30 +0100 Subject: [blitter] Fix memory leak in the blitter paintengine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The raster engine and the capabilities were leaked, use the QScopedPointer to prevent that from happening. Cherry-picked-from: qtbase:d5f12b898b8480c891382c54672422c50218751a. Change-Id: I31ba0117280b48ad942fbb638fb151ccb7b34385 Merge-request: 1492 Reviewed-by: Jørgen Lind --- src/gui/painting/qpaintengine_blitter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp index 75efa20..69f0301 100644 --- a/src/gui/painting/qpaintengine_blitter.cpp +++ b/src/gui/painting/qpaintengine_blitter.cpp @@ -198,8 +198,8 @@ public: hasXForm(false) { - raster = new QRasterPaintEngine(p->buffer()); - capabillities = new CapabilitiesToStateMask(pmData->blittable()->capabilities()); + raster.reset(new QRasterPaintEngine(p->buffer())); + capabillities.reset(new CapabilitiesToStateMask(pmData->blittable()->capabilities())); } inline void lock() { @@ -279,12 +279,12 @@ public: raster->d_func()->systemStateChanged(); } - QRasterPaintEngine *raster; + QScopedPointer raster; QBlittablePixmapData *pmData; bool isBlitterLocked; - CapabilitiesToStateMask *capabillities; + QScopedPointer capabillities; uint hasXForm; }; @@ -655,7 +655,7 @@ void QBlitterPaintEngine::setState(QPainterState *s) inline QRasterPaintEngine *QBlitterPaintEngine::raster() const { Q_D(const QBlitterPaintEngine); - return d->raster; + return d->raster.data(); } QT_END_NAMESPACE -- cgit v0.12 From 139ff0b47d5f00bf7b7eca5f7c233ad70da203c4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 13 Dec 2011 12:02:30 +0100 Subject: [blitter] Generate a new serial number when resizing the MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The raster pixmap is generating a new serial number when the pixmap is resized, do the same for the blitter code. Cherry-picked-from: qtbase:6e13586d8b6d80ab374197649c76e7f0b35045db Merge-request: 1492 Reviewed-by: Jørgen Lind --- src/gui/image/qpixmap_blitter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index f3a4318..836ade7 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -104,6 +104,7 @@ void QBlittablePixmapData::resize(int width, int height) w = width; h = height; is_null = (w <= 0 || h <= 0); + setSerialNumber(++global_ser_no); } int QBlittablePixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const -- cgit v0.12 From e394dd804fa6690f6d4bd270f61ca56331cea63b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 13 Dec 2011 12:02:32 +0100 Subject: [blitter] Use QScopedPointer for the engine and blittable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the QScopedPointer to prevent memory leaks, right now the code appears to be sound but make it more clear that calling ::setBlittable will destroy the old one. Cherry-picked-from: qtbase:dc4764229a3eef5c0bdbd665f2e24e59398e8c51 Change-Id: Idc71add7cfd429ff5b9d0ea9908d9fff1e7ce74d Merge-request: 59 Reviewed-on: http://codereview.qt-project.org/5243 Reviewed-by: Jørgen Lind Merge-request: 1492 Reviewed-by: Jørgen Lind --- src/gui/image/qpixmap_blitter.cpp | 20 ++++++++------------ src/gui/image/qpixmap_blitter_p.h | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index 836ade7..f8fb538 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE static int global_ser_no = 0; QBlittablePixmapData::QBlittablePixmapData() - : QPixmapData(QPixmapData::PixmapType,BlitterClass), m_engine(0), m_blittable(0) + : QPixmapData(QPixmapData::PixmapType,BlitterClass) #ifdef QT_BLITTER_RASTEROVERLAY ,m_rasterOverlay(0), m_unmergedCopy(0) #endif //QT_BLITTER_RASTEROVERLAY @@ -67,8 +67,6 @@ QBlittablePixmapData::QBlittablePixmapData() QBlittablePixmapData::~QBlittablePixmapData() { - delete m_blittable; - delete m_engine; #ifdef QT_BLITTER_RASTEROVERLAY delete m_rasterOverlay; delete m_unmergedCopy; @@ -79,25 +77,23 @@ QBlittable *QBlittablePixmapData::blittable() const { if (!m_blittable) { QBlittablePixmapData *that = const_cast(this); - that->m_blittable = this->createBlittable(QSize(w,h)); + that->m_blittable.reset(this->createBlittable(QSize(w,h))); } - return m_blittable; + return m_blittable.data(); } void QBlittablePixmapData::setBlittable(QBlittable *blittable) { resize(blittable->size().width(),blittable->size().height()); - m_blittable = blittable; + m_blittable.reset(blittable); } void QBlittablePixmapData::resize(int width, int height) { - delete m_blittable; - m_blittable = 0; - delete m_engine; - m_engine = 0; + m_blittable.reset(0); + m_engine.reset(0); #ifdef Q_WS_QPA d = QApplicationPrivate::platformIntegration()->screens().at(0)->depth(); #endif @@ -209,9 +205,9 @@ QPaintEngine *QBlittablePixmapData::paintEngine() const { if (!m_engine) { QBlittablePixmapData *that = const_cast(this); - that->m_engine = new QBlitterPaintEngine(that); + that->m_engine.reset(new QBlitterPaintEngine(that)); } - return m_engine; + return m_engine.data(); } #ifdef QT_BLITTER_RASTEROVERLAY diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h index 07791e5..9b809ca 100644 --- a/src/gui/image/qpixmap_blitter_p.h +++ b/src/gui/image/qpixmap_blitter_p.h @@ -83,8 +83,8 @@ public: #endif //QT_BLITTER_RASTEROVERLAY protected: - QBlitterPaintEngine *m_engine; - QBlittable *m_blittable; + QScopedPointer m_engine; + QScopedPointer m_blittable; #ifdef QT_BLITTER_RASTEROVERLAY QImage *m_rasterOverlay; -- cgit v0.12 From ee387dcb715ebc21f63b524bb87a8ffaf198f8aa Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 13 Dec 2011 12:02:32 +0100 Subject: [blitter] Work on tst_QPixmap::clear() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default QPixmap may not hasAlphaChannel(), only if setMask() or fill() with a transparent color is called a QPixmap will hasAlphaChannel(). Make the QBlittablePlatformPixmap remember if there is an alpha channel, pass this as parameter in createBlittable to make it clear that this is required and not optional. Update the DirectFB plugin to handle this parameter to create a RGB32 or ARGB Surface depending on the alpha value, also only use PreMultiplied alpha when using ARGB. Separate the two constructors for the QDirectFbBlitter to either adopt a DirectFB Surface or to create one. Cherry-picked-from: qtbase:ab50b60f5cc237d5620f3ff3b2eb44c857f8f60b Change-Id: I8abf82408ecd2d075fc6f241ace8be2a34ac56e7 Reviewed-by: Jørgen Lind Merge-request: 1492 Reviewed-by: Jørgen Lind --- src/gui/image/qpixmap_blitter.cpp | 15 ++++++++-- src/gui/image/qpixmap_blitter_p.h | 3 +- .../platforms/directfb/qdirectfbblitter.cpp | 33 ++++++++++++++-------- src/plugins/platforms/directfb/qdirectfbblitter.h | 10 +++++-- 4 files changed, 45 insertions(+), 16 deletions(-) diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index f8fb538..c73e6a9 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -58,6 +58,7 @@ static int global_ser_no = 0; QBlittablePixmapData::QBlittablePixmapData() : QPixmapData(QPixmapData::PixmapType,BlitterClass) + , m_alpha(false) #ifdef QT_BLITTER_RASTEROVERLAY ,m_rasterOverlay(0), m_unmergedCopy(0) #endif //QT_BLITTER_RASTEROVERLAY @@ -77,7 +78,7 @@ QBlittable *QBlittablePixmapData::blittable() const { if (!m_blittable) { QBlittablePixmapData *that = const_cast(this); - that->m_blittable.reset(this->createBlittable(QSize(w,h))); + that->m_blittable.reset(this->createBlittable(QSize(w,h), m_alpha)); } return m_blittable.data(); @@ -136,7 +137,16 @@ void QBlittablePixmapData::fill(const QColor &color) if (color.alpha() == 255 && blittable()->capabilities() & QBlittable::SolidRectCapability) { blittable()->unlock(); blittable()->fillRect(QRectF(0,0,w,h),color); - }else { + } else { + // Need to be backed with an alpha channel now. It would be nice + // if we could just change the format, e.g. when going from + // RGB32 -> ARGB8888. + if (color.alpha() != 255 && !hasAlphaChannel()) { + m_blittable.reset(0); + m_engine.reset(0); + m_alpha = true; + } + uint pixel; switch (blittable()->lock()->format()) { case QImage::Format_ARGB32_Premultiplied: @@ -182,6 +192,7 @@ bool QBlittablePixmapData::hasAlphaChannel() const void QBlittablePixmapData::fromImage(const QImage &image, Qt::ImageConversionFlags flags) { + m_alpha = image.hasAlphaChannel(); resize(image.width(),image.height()); markRasterOverlay(QRect(0,0,w,h)); QImage *thisImg = buffer(); diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h index 9b809ca..4742a83 100644 --- a/src/gui/image/qpixmap_blitter_p.h +++ b/src/gui/image/qpixmap_blitter_p.h @@ -55,7 +55,7 @@ public: QBlittablePixmapData(); ~QBlittablePixmapData(); - virtual QBlittable *createBlittable(const QSize &size) const = 0; + virtual QBlittable *createBlittable(const QSize &size, bool alpha) const = 0; QBlittable *blittable() const; void setBlittable(QBlittable *blittable); @@ -85,6 +85,7 @@ public: protected: QScopedPointer m_engine; QScopedPointer m_blittable; + bool m_alpha; #ifdef QT_BLITTER_RASTEROVERLAY QImage *m_rasterOverlay; diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.cpp b/src/plugins/platforms/directfb/qdirectfbblitter.cpp index 86a8bf7..83c27d1 100644 --- a/src/plugins/platforms/directfb/qdirectfbblitter.cpp +++ b/src/plugins/platforms/directfb/qdirectfbblitter.cpp @@ -54,22 +54,33 @@ QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, IDirectFBSurface *surface) |QBlittable::SourceOverPixmapCapability |QBlittable::SourceOverScaledPixmapCapability)) { - if (surface) { - m_surface = surface; - } else { - DFBSurfaceDescription surfaceDesc; - memset(&surfaceDesc,0,sizeof(DFBSurfaceDescription)); - surfaceDesc.width = rect.width(); - surfaceDesc.height = rect.height(); + m_surface = surface; +} + +QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, bool alpha) + : QBlittable(rect, QBlittable::Capabilities(QBlittable::SolidRectCapability + |QBlittable::SourcePixmapCapability + |QBlittable::SourceOverPixmapCapability + |QBlittable::SourceOverScaledPixmapCapability)) +{ + DFBSurfaceDescription surfaceDesc; + memset(&surfaceDesc,0,sizeof(DFBSurfaceDescription)); + surfaceDesc.width = rect.width(); + surfaceDesc.height = rect.height(); + + if (alpha) { surfaceDesc.caps = DSCAPS_PREMULTIPLIED; surfaceDesc.pixelformat = DSPF_ARGB; surfaceDesc.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_CAPS | DSDESC_PIXELFORMAT); - - IDirectFB *dfb = QDirectFbConvenience::dfbInterface(); - dfb->CreateSurface(dfb,&surfaceDesc, &m_surface); - m_surface->Clear(m_surface,0,0,0,0); + } else { + surfaceDesc.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT); + surfaceDesc.pixelformat = DSPF_RGB32; } + + IDirectFB *dfb = QDirectFbConvenience::dfbInterface(); + dfb->CreateSurface(dfb , &surfaceDesc, &m_surface); + m_surface->Clear(m_surface, 0, 0, 0, 0); } QDirectFbBlitter::~QDirectFbBlitter() diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.h b/src/plugins/platforms/directfb/qdirectfbblitter.h index 16d7599..5a2b77f 100644 --- a/src/plugins/platforms/directfb/qdirectfbblitter.h +++ b/src/plugins/platforms/directfb/qdirectfbblitter.h @@ -51,7 +51,8 @@ class QDirectFbBlitter : public QBlittable { public: - QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface = 0); + QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface); + QDirectFbBlitter(const QSize &size, bool alpha); virtual ~QDirectFbBlitter(); virtual void fillRect(const QRectF &rect, const QColor &color); @@ -70,7 +71,12 @@ protected: class QDirectFbBlitterPixmapData : public QBlittablePixmapData { public: - QBlittable *createBlittable(const QSize &size) const { return new QDirectFbBlitter(size); } + QBlittable *createBlittable(const QSize &size, bool alpha) const; }; +inline QBlittable *QDirectFbBlitterPixmapData::createBlittable(const QSize& size, bool alpha) const +{ + return new QDirectFbBlitter(size, alpha); +} + #endif // QDIRECTFBBLITTER_H -- cgit v0.12 From c614e71cdd4047bb49ccde2f94c9d622f5071fc3 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 13 Dec 2011 12:02:33 +0100 Subject: directfb: Backport the work from QtBase to Qt 4.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is copying the files (minus the API changes) to Qt 4.8. It fixes memory leaks, adds DirectFB based image decoding, prepares EGL integration/ Merge-request: 1492 Reviewed-by: Jørgen Lind --- src/plugins/platforms/directfb/directfb.pro | 6 +- src/plugins/platforms/directfb/main.cpp | 22 ++- .../platforms/directfb/qdirectfbblitter.cpp | 166 +++++++++++++++++---- src/plugins/platforms/directfb/qdirectfbblitter.h | 34 ++++- .../platforms/directfb/qdirectfbconvenience.cpp | 37 ++++- .../platforms/directfb/qdirectfbconvenience.h | 44 +++++- src/plugins/platforms/directfb/qdirectfbcursor.cpp | 34 +++-- src/plugins/platforms/directfb/qdirectfbcursor.h | 16 +- .../platforms/directfb/qdirectfbglcontext.cpp | 4 + src/plugins/platforms/directfb/qdirectfbinput.cpp | 86 +++++------ src/plugins/platforms/directfb/qdirectfbinput.h | 24 ++- .../platforms/directfb/qdirectfbintegration.cpp | 81 +++++----- .../platforms/directfb/qdirectfbintegration.h | 44 ++---- src/plugins/platforms/directfb/qdirectfbscreen.cpp | 72 +++++++++ src/plugins/platforms/directfb/qdirectfbscreen.h | 82 ++++++++++ src/plugins/platforms/directfb/qdirectfbwindow.cpp | 118 +++++++++------ src/plugins/platforms/directfb/qdirectfbwindow.h | 12 +- .../platforms/directfb/qdirectfbwindowsurface.cpp | 42 ++---- .../platforms/directfb/qdirectfbwindowsurface.h | 11 +- 19 files changed, 653 insertions(+), 282 deletions(-) create mode 100644 src/plugins/platforms/directfb/qdirectfbscreen.cpp create mode 100644 src/plugins/platforms/directfb/qdirectfbscreen.h diff --git a/src/plugins/platforms/directfb/directfb.pro b/src/plugins/platforms/directfb/directfb.pro index 65c49e3..aaf4057 100644 --- a/src/plugins/platforms/directfb/directfb.pro +++ b/src/plugins/platforms/directfb/directfb.pro @@ -20,7 +20,8 @@ SOURCES = main.cpp \ qdirectfbinput.cpp \ qdirectfbcursor.cpp \ qdirectfbwindow.cpp \ - qdirectfbglcontext.cpp + qdirectfbglcontext.cpp \ + qdirectfbscreen.cpp HEADERS = qdirectfbintegration.h \ qdirectfbwindowsurface.h \ qdirectfbblitter.h \ @@ -28,7 +29,8 @@ HEADERS = qdirectfbintegration.h \ qdirectfbinput.h \ qdirectfbcursor.h \ qdirectfbwindow.h \ - qdirectfbglcontext.h + qdirectfbglcontext.h \ + qdirectfbscreen.h include(../fontdatabases/genericunix/genericunix.pri) target.path += $$[QT_INSTALL_PLUGINS]/platforms diff --git a/src/plugins/platforms/directfb/main.cpp b/src/plugins/platforms/directfb/main.cpp index 312fc41..da37b0a 100644 --- a/src/plugins/platforms/directfb/main.cpp +++ b/src/plugins/platforms/directfb/main.cpp @@ -44,6 +44,16 @@ QT_BEGIN_NAMESPACE +#ifdef DIRECTFB_GL_EGL +#define QT_EGL_BACKEND_STRING(list) list << "directfbegl"; +#define QT_EGL_BACKEND_CREATE(list, out) \ + if (list.toLower() == "directfbegl") \ + out = new QDirectFbIntegrationEGL; +#else +#define QT_EGL_BACKEND_STRING(list) +#define QT_EGL_BACKEND_CREATE(system, out) +#endif + class QDirectFbIntegrationPlugin : public QPlatformIntegrationPlugin { public: @@ -55,16 +65,24 @@ QStringList QDirectFbIntegrationPlugin::keys() const { QStringList list; list << "directfb"; + QT_EGL_BACKEND_STRING(list); return list; } QPlatformIntegration * QDirectFbIntegrationPlugin::create(const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); + QDirectFbIntegration *integration = 0; + if (system.toLower() == "directfb") - return new QDirectFbIntegration; + integration = new QDirectFbIntegration; + QT_EGL_BACKEND_CREATE(system, integration) + + if (!integration) + return 0; - return 0; + integration->initialize(); + return integration; } Q_EXPORT_PLUGIN2(directfb, QDirectFbIntegrationPlugin) diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.cpp b/src/plugins/platforms/directfb/qdirectfbblitter.cpp index 83c27d1..af060aa 100644 --- a/src/plugins/platforms/directfb/qdirectfbblitter.cpp +++ b/src/plugins/platforms/directfb/qdirectfbblitter.cpp @@ -45,23 +45,29 @@ #include #include +#include #include +QT_BEGIN_NAMESPACE + +static QBlittable::Capabilities dfb_blitter_capabilities() +{ + return QBlittable::Capabilities(QBlittable::SolidRectCapability + |QBlittable::SourcePixmapCapability + |QBlittable::SourceOverPixmapCapability + |QBlittable::SourceOverScaledPixmapCapability); +} + QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, IDirectFBSurface *surface) - : QBlittable(rect, QBlittable::Capabilities(QBlittable::SolidRectCapability - |QBlittable::SourcePixmapCapability - |QBlittable::SourceOverPixmapCapability - |QBlittable::SourceOverScaledPixmapCapability)) + : QBlittable(rect, dfb_blitter_capabilities()) + , m_surface(surface) { - m_surface = surface; + m_surface->AddRef(m_surface.data()); } QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, bool alpha) - : QBlittable(rect, QBlittable::Capabilities(QBlittable::SolidRectCapability - |QBlittable::SourcePixmapCapability - |QBlittable::SourceOverPixmapCapability - |QBlittable::SourceOverScaledPixmapCapability)) + : QBlittable(rect, dfb_blitter_capabilities()) { DFBSurfaceDescription surfaceDesc; memset(&surfaceDesc,0,sizeof(DFBSurfaceDescription)); @@ -70,34 +76,48 @@ QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, bool alpha) if (alpha) { surfaceDesc.caps = DSCAPS_PREMULTIPLIED; - surfaceDesc.pixelformat = DSPF_ARGB; + surfaceDesc.pixelformat = QDirectFbBlitter::alphaPixmapFormat(); surfaceDesc.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_CAPS | DSDESC_PIXELFORMAT); } else { surfaceDesc.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT); - surfaceDesc.pixelformat = DSPF_RGB32; + surfaceDesc.pixelformat = QDirectFbBlitter::pixmapFormat(); } IDirectFB *dfb = QDirectFbConvenience::dfbInterface(); - dfb->CreateSurface(dfb , &surfaceDesc, &m_surface); - m_surface->Clear(m_surface, 0, 0, 0, 0); + dfb->CreateSurface(dfb , &surfaceDesc, m_surface.outPtr()); + m_surface->Clear(m_surface.data(), 0, 0, 0, 0); } QDirectFbBlitter::~QDirectFbBlitter() { unlock(); - m_surface->Release(m_surface); +} + +DFBSurfacePixelFormat QDirectFbBlitter::alphaPixmapFormat() +{ + return DSPF_ARGB; +} + +DFBSurfacePixelFormat QDirectFbBlitter::pixmapFormat() +{ + return DSPF_RGB32; +} + +DFBSurfacePixelFormat QDirectFbBlitter::selectPixmapFormat(bool withAlpha) +{ + return withAlpha ? alphaPixmapFormat() : pixmapFormat(); } void QDirectFbBlitter::fillRect(const QRectF &rect, const QColor &color) { - m_surface->SetColor(m_surface, color.red(), color.green(), color.blue(), color.alpha()); + m_surface->SetColor(m_surface.data(), color.red(), color.green(), color.blue(), color.alpha()); // When the blitter api supports non opaque blits, also remember to change // qpixmap_blitter.cpp::fill // DFBSurfaceDrawingFlags drawingFlags = color.alpha() ? DSDRAW_BLEND : DSDRAW_NOFX; // m_surface->SetDrawingFlags(m_surface, drawingFlags); - m_surface->SetDrawingFlags(m_surface, DSDRAW_NOFX); - m_surface->FillRectangle(m_surface, rect.x(), rect.y(), + m_surface->SetDrawingFlags(m_surface.data(), DSDRAW_NOFX); + m_surface->FillRectangle(m_surface.data(), rect.x(), rect.y(), rect.width(), rect.height()); } @@ -110,7 +130,7 @@ void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, con QDirectFbBlitter *dfbBlitter = static_cast(blitPm->blittable()); dfbBlitter->unlock(); - IDirectFBSurface *s = dfbBlitter->m_surface; + IDirectFBSurface *s = dfbBlitter->m_surface.data(); DFBSurfaceBlittingFlags blittingFlags = DSBLIT_NOFX; DFBSurfacePorterDuffRule porterDuff = DSPD_SRC; @@ -119,18 +139,18 @@ void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, con porterDuff = DSPD_SRC_OVER; } - m_surface->SetBlittingFlags(m_surface, DFBSurfaceBlittingFlags(blittingFlags)); - m_surface->SetPorterDuff(m_surface,porterDuff); - m_surface->SetDstBlendFunction(m_surface,DSBF_INVSRCALPHA); + m_surface->SetBlittingFlags(m_surface.data(), DFBSurfaceBlittingFlags(blittingFlags)); + m_surface->SetPorterDuff(m_surface.data(), porterDuff); + m_surface->SetDstBlendFunction(m_surface.data(), DSBF_INVSRCALPHA); const DFBRectangle sRect = { srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height() }; DFBResult result; if (rect.width() == srcRect.width() && rect.height() == srcRect.height()) - result = m_surface->Blit(m_surface, s, &sRect, rect.x(), rect.y()); + result = m_surface->Blit(m_surface.data(), s, &sRect, rect.x(), rect.y()); else { const DFBRectangle dRect = { rect.x(), rect.y(), rect.width(), rect.height() }; - result = m_surface->StretchBlit(m_surface, s, &sRect, &dRect); + result = m_surface->StretchBlit(m_surface.data(), s, &sRect, &dRect); } if (result != DFB_OK) DirectFBError("QDirectFBBlitter::drawPixmap()", result); @@ -143,15 +163,15 @@ QImage *QDirectFbBlitter::doLock() void *mem; int bpl; - const DFBResult result = m_surface->Lock(m_surface, DFBSurfaceLockFlags(DSLF_WRITE|DSLF_READ), static_cast(&mem), &bpl); + const DFBResult result = m_surface->Lock(m_surface.data(), DFBSurfaceLockFlags(DSLF_WRITE|DSLF_READ), static_cast(&mem), &bpl); if (result == DFB_OK) { DFBSurfacePixelFormat dfbFormat; DFBSurfaceCapabilities dfbCaps; - m_surface->GetPixelFormat(m_surface,&dfbFormat); - m_surface->GetCapabilities(m_surface,&dfbCaps); + m_surface->GetPixelFormat(m_surface.data(), &dfbFormat); + m_surface->GetCapabilities(m_surface.data(), &dfbCaps); QImage::Format format = QDirectFbConvenience::imageFormatFromSurfaceFormat(dfbFormat, dfbCaps); int w, h; - m_surface->GetSize(m_surface,&w,&h); + m_surface->GetSize(m_surface.data(), &w, &h); m_image = QImage(static_cast(mem),w,h,bpl,format); } else { DirectFBError("Failed to lock image", result); @@ -160,7 +180,97 @@ QImage *QDirectFbBlitter::doLock() return &m_image; } +bool QDirectFbBlitterPlatformPixmap::fromDataBufferDescription(const DFBDataBufferDescription &dataBufferDescription) +{ + DFBResult result; + IDirectFB *dfb = QDirectFbConvenience::dfbInterface(); + + // Create a data buffer + QDirectFBPointer dataBuffer; + result = dfb->CreateDataBuffer(dfb, &dataBufferDescription, dataBuffer.outPtr()); + if (result != DFB_OK) { + DirectFBError(QDFB_PRETTY, result); + return false; + } + + // Create the image provider + QDirectFBPointer provider; + result = dataBuffer->CreateImageProvider(dataBuffer.data(), provider.outPtr()); + if (result != DFB_OK) { + DirectFBError(QDFB_PRETTY, result); + return false; + } + + // Extract image information + DFBImageDescription imageDescription; + result = provider->GetImageDescription(provider.data(), &imageDescription); + if (result != DFB_OK) { + DirectFBError(QDFB_PRETTY, result); + return false; + } + + // Can we handle this directlu? + if (imageDescription.caps & DICAPS_COLORKEY) + return false; + + DFBSurfaceDescription surfaceDescription; + result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription); + if (result != DFB_OK) { + DirectFBError(QDFB_PRETTY, result); + return false; + } + + m_alpha = imageDescription.caps & DICAPS_ALPHACHANNEL; + resize(surfaceDescription.width, surfaceDescription.height); + // TODO: FIXME; update d + + + result = provider->RenderTo(provider.data(), dfbBlitter()->dfbSurface(), 0); + if (result != DFB_OK) { + DirectFBError(QDFB_PRETTY, result); + return false; + } + + return true; +} + +bool QDirectFbBlitterPlatformPixmap::fromFile(const QString &filename, const char *format, + Qt::ImageConversionFlags flags) +{ + // If we can't find the file, pass it on to the base class as it is + // trying harder by appending various extensions to the path. + if (!QFile::exists(filename)) + return QBlittablePixmapData::fromFile(filename, format, flags); + + // Stop if there is a requirement for colors + if (flags != Qt::AutoColor) + return QBlittablePixmapData::fromFile(filename, format, flags); + + // Deal with resources + if (filename.startsWith(QLatin1Char(':'))) { // resource + QFile file(filename); + if (!file.open(QIODevice::ReadOnly)) + return false; + const QByteArray data = file.readAll(); + file.close(); + return fromData(reinterpret_cast(data.constData()), data.size(), format, flags); + } + + // Try to use directfb to load it. + DFBDataBufferDescription description; + description.flags = DBDESC_FILE; + const QByteArray fileNameData = filename.toLocal8Bit(); + description.file = fileNameData.constData(); + if (fromDataBufferDescription(description)) + return true; + + // Fallback + return QBlittablePixmapData::fromFile(filename, format, flags); +} + void QDirectFbBlitter::doUnlock() { - m_surface->Unlock(m_surface); + m_surface->Unlock(m_surface.data()); } + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.h b/src/plugins/platforms/directfb/qdirectfbblitter.h index 5a2b77f..fe39aaf 100644 --- a/src/plugins/platforms/directfb/qdirectfbblitter.h +++ b/src/plugins/platforms/directfb/qdirectfbblitter.h @@ -48,6 +48,8 @@ #include +QT_BEGIN_NAMESPACE + class QDirectFbBlitter : public QBlittable { public: @@ -58,25 +60,51 @@ public: virtual void fillRect(const QRectF &rect, const QColor &color); virtual void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect); + IDirectFBSurface *dfbSurface() const; + + static DFBSurfacePixelFormat alphaPixmapFormat(); + static DFBSurfacePixelFormat pixmapFormat(); + static DFBSurfacePixelFormat selectPixmapFormat(bool withAlpha); + protected: virtual QImage *doLock(); virtual void doUnlock(); - IDirectFBSurface *m_surface; + QDirectFBPointer m_surface; QImage m_image; friend class QDirectFbConvenience; }; -class QDirectFbBlitterPixmapData : public QBlittablePixmapData +class QDirectFbBlitterPlatformPixmap : public QBlittablePixmapData { public: QBlittable *createBlittable(const QSize &size, bool alpha) const; + + QDirectFbBlitter *dfbBlitter() const; + + virtual bool fromFile(const QString &filename, const char *format, + Qt::ImageConversionFlags flags); + +private: + bool fromDataBufferDescription(const DFBDataBufferDescription &); }; -inline QBlittable *QDirectFbBlitterPixmapData::createBlittable(const QSize& size, bool alpha) const +inline QBlittable *QDirectFbBlitterPlatformPixmap::createBlittable(const QSize& size, bool alpha) const { return new QDirectFbBlitter(size, alpha); } +inline QDirectFbBlitter *QDirectFbBlitterPlatformPixmap::dfbBlitter() const +{ + return static_cast(blittable()); +} + +inline IDirectFBSurface *QDirectFbBlitter::dfbSurface() const +{ + return m_surface.data(); +} + +QT_END_NAMESPACE + #endif // QDIRECTFBBLITTER_H diff --git a/src/plugins/platforms/directfb/qdirectfbconvenience.cpp b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp index 37810dc..83c71b3 100644 --- a/src/plugins/platforms/directfb/qdirectfbconvenience.cpp +++ b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp @@ -41,16 +41,22 @@ #include "qdirectfbconvenience.h" #include "qdirectfbblitter.h" +#include "qdirectfbscreen.h" #include +#include +#include + +QT_BEGIN_NAMESPACE + IDirectFB *QDirectFbConvenience::dfbInterface() { static IDirectFB *dfb = 0; if (!dfb) { DFBResult result = DirectFBCreate(&dfb); if (result != DFB_OK) { - DirectFBError("QDirectFBConvenience: error creating DirectFB interface",result); + DirectFBErrorFatal("QDirectFBConvenience: error creating DirectFB interface", result); return 0; } } @@ -61,10 +67,9 @@ IDirectFBDisplayLayer *QDirectFbConvenience::dfbDisplayLayer(int display) { IDirectFBDisplayLayer *layer; DFBResult result = QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),display,&layer); - if (result != DFB_OK) { - DirectFBError("QDirectFbConvenience: " - "Unable to get primary display layer!", result); - } + if (result != DFB_OK) + DirectFBErrorFatal("QDirectFbConvenience: " + "Unable to get primary display layer!", result); return layer; } @@ -106,13 +111,17 @@ int QDirectFbConvenience::colorDepthForSurface(const DFBSurfacePixelFormat forma return ((0x1f << 7) & format) >> 7; } -IDirectFBSurface *QDirectFbConvenience::dfbSurfaceForPixmapData(QPixmapData *pixmapData) +/** + * This is borrowing the reference of the QDirectFbBlitter. You may not store this + * pointer as a class member but must only use it locally. + */ +IDirectFBSurface *QDirectFbConvenience::dfbSurfaceForPlatformPixmap(QPixmapData *handle) { - QBlittablePixmapData *blittablePmData = static_cast(pixmapData); + QBlittablePixmapData *blittablePmData = static_cast(handle); if (blittablePmData) { QBlittable *blittable = blittablePmData->blittable(); QDirectFbBlitter *dfbBlitter = static_cast(blittable); - return dfbBlitter->m_surface; + return dfbBlitter->m_surface.data(); } return 0; } @@ -374,3 +383,15 @@ QDirectFbKeyMap::QDirectFbKeyMap() insert(DIKS_CURLY_BRACKET_RIGHT , Qt::Key_BraceRight); insert(DIKS_TILDE , Qt::Key_AsciiTilde); } + +QDirectFbScreen *toDfbScreen(QWidget *window) +{ + return static_cast(QPlatformScreen::platformScreenForWidget(window)); +} + +IDirectFBDisplayLayer *toDfbLayer(QPlatformScreen *screen) +{ + return static_cast(screen)->dfbLayer(); +} + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbconvenience.h b/src/plugins/platforms/directfb/qdirectfbconvenience.h index c82bea8..d009393 100644 --- a/src/plugins/platforms/directfb/qdirectfbconvenience.h +++ b/src/plugins/platforms/directfb/qdirectfbconvenience.h @@ -49,6 +49,11 @@ #include +QT_BEGIN_NAMESPACE + +class QDirectFbScreen; +class QPlatformScreen; + class QDirectFbKeyMap: public QHash { public: @@ -67,7 +72,7 @@ public: static IDirectFB *dfbInterface(); static IDirectFBDisplayLayer *dfbDisplayLayer(int display = DLID_PRIMARY); - static IDirectFBSurface *dfbSurfaceForPixmapData(QPixmapData *); + static IDirectFBSurface *dfbSurfaceForPlatformPixmap(QPixmapData *); static Qt::MouseButton mouseButton(DFBInputDeviceButtonIdentifier identifier); static Qt::MouseButtons mouseButtons(DFBInputDeviceButtonMask mask); @@ -81,4 +86,41 @@ private: friend class QDirectFbIntegration; }; +template struct QDirectFBInterfaceCleanupHandler +{ + static void cleanup(T *t) + { + if (!t) + return; + t->Release(t); + } +}; + +template +class QDirectFBPointer : public QScopedPointer > +{ +public: + QDirectFBPointer(T *t = 0) + : QScopedPointer >(t) + {} + + T** outPtr() + { + this->reset(0); + return &this->d; + } +}; + +// Helper conversions from internal to DFB types +QDirectFbScreen *toDfbScreen(QWidget *window); +IDirectFBDisplayLayer *toDfbLayer(QPlatformScreen *screen); + +#define QDFB_STRINGIFY(x) #x +#define QDFB_TOSTRING(x) QDFB_STRINGIFY(x) +#define QDFB_PRETTY \ + (__FILE__ ":" QDFB_TOSTRING(__LINE__)) + +QT_END_NAMESPACE + + #endif // QDIRECTFBCONVENIENCE_H diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.cpp b/src/plugins/platforms/directfb/qdirectfbcursor.cpp index 8a38bc4..ea9be84 100644 --- a/src/plugins/platforms/directfb/qdirectfbcursor.cpp +++ b/src/plugins/platforms/directfb/qdirectfbcursor.cpp @@ -42,26 +42,25 @@ #include "qdirectfbcursor.h" #include "qdirectfbconvenience.h" +QT_BEGIN_NAMESPACE -QDirectFBCursor::QDirectFBCursor(QPlatformScreen* screen) : - QPlatformCursor(screen), surface(0) +QDirectFBCursor::QDirectFBCursor(QPlatformScreen *screen) + : QPlatformCursor(screen) { - QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY, &m_layer); - image = new QPlatformCursorImage(0, 0, 0, 0, 0, 0); + m_image.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0)); } -void QDirectFBCursor::changeCursor(QCursor * cursor, QWidget * widget) +void QDirectFBCursor::changeCursor(QCursor *cursor, QWidget *) { - Q_UNUSED(widget); int xSpot; int ySpot; QPixmap map; if (cursor->shape() != Qt::BitmapCursor) { - image->set(cursor->shape()); - xSpot = image->hotspot().x(); - ySpot = image->hotspot().y(); - QImage *i = image->image(); + m_image->set(cursor->shape()); + xSpot = m_image->hotspot().x(); + ySpot = m_image->hotspot().y(); + QImage *i = m_image->image(); map = QPixmap::fromImage(*i); } else { QPoint point = cursor->hotSpot(); @@ -70,11 +69,18 @@ void QDirectFBCursor::changeCursor(QCursor * cursor, QWidget * widget) map = cursor->pixmap(); } - IDirectFBSurface *surface = QDirectFbConvenience::dfbSurfaceForPixmapData(map.pixmapData()); + DFBResult res; + IDirectFBDisplayLayer *layer = toDfbLayer(screen); + IDirectFBSurface* surface(QDirectFbConvenience::dfbSurfaceForPlatformPixmap(map.pixmapData())); - if (m_layer->SetCooperativeLevel(m_layer, DLSCL_ADMINISTRATIVE) != DFB_OK) { + res = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); + if (res != DFB_OK) { + DirectFBError("Failed to set DLSCL_ADMINISTRATIVE", res); return; } - m_layer->SetCursorShape( m_layer, surface, xSpot, ySpot); - m_layer->SetCooperativeLevel(m_layer, DLSCL_SHARED); + + layer->SetCursorShape(layer, surface, xSpot, ySpot); + layer->SetCooperativeLevel(layer, DLSCL_SHARED); } + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbcursor.h b/src/plugins/platforms/directfb/qdirectfbcursor.h index b148de5..2f8efba 100644 --- a/src/plugins/platforms/directfb/qdirectfbcursor.h +++ b/src/plugins/platforms/directfb/qdirectfbcursor.h @@ -44,20 +44,24 @@ #include #include + +#include "qdirectfbconvenience.h" + +QT_BEGIN_NAMESPACE + class QDirectFbScreen; class QDirectFbBlitter; class QDirectFBCursor : public QPlatformCursor { public: - QDirectFBCursor(QPlatformScreen *screem); - void changeCursor(QCursor * cursor, QWidget * widget); + QDirectFBCursor(QPlatformScreen *screen); + void changeCursor(QCursor *cursor, QWidget *window); private: - IDirectFBDisplayLayer * m_layer; - IDirectFBSurface * surface; - QPlatformCursorImage * image; - QDirectFbBlitter *blitter; + QScopedPointer m_image; }; +QT_END_NAMESPACE + #endif // QDIRECTFBCURSOR_H diff --git a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp index aca28f1..4111774 100644 --- a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp +++ b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp @@ -45,6 +45,8 @@ #include +QT_BEGIN_NAMESPACE + QDirectFbGLContext::QDirectFbGLContext(IDirectFBGL *glContext) : m_dfbGlContext(glContext) { @@ -99,3 +101,5 @@ QPlatformWindowFormat QDirectFbGLContext::platformWindowFormat() const { return m_windowFormat; } + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbinput.cpp b/src/plugins/platforms/directfb/qdirectfbinput.cpp index d35cea5..34dbc9d 100644 --- a/src/plugins/platforms/directfb/qdirectfbinput.cpp +++ b/src/plugins/platforms/directfb/qdirectfbinput.cpp @@ -47,65 +47,71 @@ #include #include #include -#include #include -QDirectFbInput::QDirectFbInput(QObject *parent) - : QObject(parent), m_shouldStop(false) -{ - m_dfbInterface = QDirectFbConvenience::dfbInterface(); +QT_BEGIN_NAMESPACE - DFBResult ok = m_dfbInterface->CreateEventBuffer(m_dfbInterface,&m_eventBuffer); +QDirectFbInput::QDirectFbInput(IDirectFB *dfb, IDirectFBDisplayLayer *dfbLayer) + : m_dfbInterface(dfb) + , m_dfbDisplayLayer(dfbLayer) + , m_shouldStop(false) +{ + DFBResult ok = m_dfbInterface->CreateEventBuffer(m_dfbInterface, m_eventBuffer.outPtr()); if (ok != DFB_OK) DirectFBError("Failed to initialise eventbuffer", ok); - - m_dfbInterface->GetDisplayLayer(m_dfbInterface,DLID_PRIMARY, &m_dfbDisplayLayer); - } -void QDirectFbInput::runInputEventLoop() +void QDirectFbInput::run() { - while (true) { - m_eventBuffer->WaitForEvent(m_eventBuffer); - if (m_shouldStop) { - m_waitStop.release(); - break; - } - handleEvents(); + while (!m_shouldStop) { + if (m_eventBuffer->WaitForEvent(m_eventBuffer.data()) == DFB_OK) + handleEvents(); } } void QDirectFbInput::stopInputEventLoop() { m_shouldStop = true; - m_waitStop.acquire(); + m_eventBuffer->WakeUp(m_eventBuffer.data()); } -void QDirectFbInput::addWindow(DFBWindowID id, QWidget *tlw) +void QDirectFbInput::addWindow(IDirectFBWindow *window, QWidget *platformWindow) { - m_tlwMap.insert(id,tlw); - IDirectFBWindow *window; - m_dfbDisplayLayer->GetWindow(m_dfbDisplayLayer,id,&window); + DFBResult res; + DFBWindowID id; - window->AttachEventBuffer(window,m_eventBuffer); + res = window->GetID(window, &id); + if (res != DFB_OK) { + DirectFBError("QDirectFbInput::addWindow", res); + return; + } + + m_tlwMap.insert(id, platformWindow); + window->AttachEventBuffer(window, m_eventBuffer.data()); } -void QDirectFbInput::removeWindow(WId wId) +void QDirectFbInput::removeWindow(IDirectFBWindow *window) { - IDirectFBWindow *window; - m_dfbDisplayLayer->GetWindow(m_dfbDisplayLayer,wId, &window); + DFBResult res; + DFBWindowID id; - window->DetachEventBuffer(window,m_eventBuffer); - m_tlwMap.remove(wId); + res = window->GetID(window, &id); + if (res != DFB_OK) { + DirectFBError("QDirectFbInput::removeWindow", res); + return; + } + + window->DetachEventBuffer(window, m_eventBuffer.data()); + m_tlwMap.remove(id); } void QDirectFbInput::handleEvents() { - DFBResult hasEvent = m_eventBuffer->HasEvent(m_eventBuffer); + DFBResult hasEvent = m_eventBuffer->HasEvent(m_eventBuffer.data()); while(hasEvent == DFB_OK){ DFBEvent event; - DFBResult ok = m_eventBuffer->GetEvent(m_eventBuffer,&event); + DFBResult ok = m_eventBuffer->GetEvent(m_eventBuffer.data(), &event); if (ok != DFB_OK) DirectFBError("Failed to get event",ok); if (event.clazz == DFEC_WINDOW) { @@ -131,7 +137,7 @@ void QDirectFbInput::handleEvents() } - hasEvent = m_eventBuffer->HasEvent(m_eventBuffer); + hasEvent = m_eventBuffer->HasEvent(m_eventBuffer.data()); } } @@ -141,17 +147,12 @@ void QDirectFbInput::handleMouseEvents(const DFBEvent &event) QPoint globalPos = globalPoint(event); Qt::MouseButtons buttons = QDirectFbConvenience::mouseButtons(event.window.buttons); - IDirectFBDisplayLayer *layer = QDirectFbConvenience::dfbDisplayLayer(); - IDirectFBWindow *window; - layer->GetWindow(layer,event.window.window_id,&window); + QDirectFBPointer layer(QDirectFbConvenience::dfbDisplayLayer()); + QDirectFBPointer window; + layer->GetWindow(layer.data(), event.window.window_id, window.outPtr()); long timestamp = (event.window.timestamp.tv_sec*1000) + (event.window.timestamp.tv_usec/1000); - if (event.window.type == DWET_BUTTONDOWN) { - window->GrabPointer(window); - } else if (event.window.type == DWET_BUTTONUP) { - window->UngrabPointer(window); - } QWidget *tlw = m_tlwMap.value(event.window.window_id); QWindowSystemInterface::handleMouseEvent(tlw, timestamp, p, globalPos, buttons); } @@ -199,10 +200,11 @@ void QDirectFbInput::handleEnterLeaveEvents(const DFBEvent &event) inline QPoint QDirectFbInput::globalPoint(const DFBEvent &event) const { - IDirectFBWindow *window; - m_dfbDisplayLayer->GetWindow(m_dfbDisplayLayer,event.window.window_id,&window); + QDirectFBPointer window; + m_dfbDisplayLayer->GetWindow(m_dfbDisplayLayer, event.window.window_id, window.outPtr()); int x,y; - window->GetPosition(window,&x,&y); + window->GetPosition(window.data(), &x, &y); return QPoint(event.window.cx +x, event.window.cy + y); } +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbinput.h b/src/plugins/platforms/directfb/qdirectfbinput.h index 3b8008f..698ee3a 100644 --- a/src/plugins/platforms/directfb/qdirectfbinput.h +++ b/src/plugins/platforms/directfb/qdirectfbinput.h @@ -42,30 +42,30 @@ #ifndef QDIRECTFBINPUT_H #define QDIRECTFBINPUT_H -#include -#include +#include #include #include #include #include -#include +#include "qdirectfbconvenience.h" -class QDirectFbInput : public QObject +class QDirectFbInput : public QThread { Q_OBJECT public: - QDirectFbInput(QObject *parent); - void addWindow(DFBWindowID id, QWidget *tlw); - void removeWindow(WId wId); + QDirectFbInput(IDirectFB *dfb, IDirectFBDisplayLayer *dfbLayer); + void addWindow(IDirectFBWindow *window, QWidget *platformWindow); + void removeWindow(IDirectFBWindow *window); -public slots: - void runInputEventLoop(); void stopInputEventLoop(); - void handleEvents(); + +protected: + void run(); private: + void handleEvents(); void handleMouseEvents(const DFBEvent &event); void handleWheelEvent(const DFBEvent &event); void handleKeyEvents(const DFBEvent &event); @@ -75,11 +75,9 @@ private: IDirectFB *m_dfbInterface; IDirectFBDisplayLayer *m_dfbDisplayLayer; - IDirectFBEventBuffer *m_eventBuffer; + QDirectFBPointer m_eventBuffer; bool m_shouldStop; - QSemaphore m_waitStop; - QHashm_tlwMap; }; diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp index 06b0b51..15f0036 100644 --- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp +++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp @@ -46,43 +46,27 @@ #include "qdirectfbcursor.h" #include "qdirectfbwindow.h" -#include "qgenericunixfontdatabase.h" - -#include -#include - #include -#include +#include #include #include -QT_BEGIN_NAMESPACE - -QDirectFbScreen::QDirectFbScreen(int display) - :QPlatformScreen() -{ - m_layer = QDirectFbConvenience::dfbDisplayLayer(display); - m_layer->SetCooperativeLevel(m_layer,DLSCL_SHARED); - - DFBDisplayLayerConfig config; - m_layer->GetConfiguration(m_layer, &config); +#include "qgenericunixfontdatabase.h" - m_format = QDirectFbConvenience::imageFormatFromSurfaceFormat(config.pixelformat, config.surface_caps); - m_geometry = QRect(0,0,config.width,config.height); - const int dpi = 72; - const qreal inch = 25.4; - m_depth = QDirectFbConvenience::colorDepthForSurface(config.pixelformat); - m_physicalSize = QSize(qRound(config.width * inch / dpi), qRound(config.height *inch / dpi)); +QT_BEGIN_NAMESPACE - cursor = new QDirectFBCursor(this); -} +QDirectFbIntegration::QDirectFbIntegration() + : m_fontDb(new QGenericUnixFontDatabase()) +{} -QDirectFbScreen::~QDirectFbScreen() +void QDirectFbIntegration::initialize() { + initializeDirectFB(); + initializeScreen(); + initializeInput(); } -QDirectFbIntegration::QDirectFbIntegration() - : mFontDb(new QGenericUnixFontDatabase()) +void QDirectFbIntegration::initializeDirectFB() { const QStringList args = QCoreApplication::arguments(); int argc = args.size(); @@ -96,26 +80,31 @@ QDirectFbIntegration::QDirectFbIntegration() DirectFBError("QDirectFBScreen: error initializing DirectFB", result); } + + for (int i = 0; i < argc; ++i) + delete[] argv[i]; delete[] argv; + // This must happen after DirectFBInit. + m_dfb.reset(QDirectFbConvenience::dfbInterface()); +} - QDirectFbScreen *primaryScreen = new QDirectFbScreen(0); - mScreens.append(primaryScreen); +void QDirectFbIntegration::initializeScreen() +{ + m_primaryScreen.reset(new QDirectFbScreen(0)); + mScreens.append(m_primaryScreen.data()); +} - mInputRunner = new QThread; - mInput = new QDirectFbInput(0); - mInput->moveToThread(mInputRunner); - QObject::connect(mInputRunner,SIGNAL(started()),mInput,SLOT(runInputEventLoop())); - mInputRunner->start(); +void QDirectFbIntegration::initializeInput() +{ + m_input.reset(new QDirectFbInput(m_dfb.data(), m_primaryScreen->dfbLayer())); + m_input->start(); } QDirectFbIntegration::~QDirectFbIntegration() { - mInput->stopInputEventLoop(); - mInputRunner->quit(); - mInputRunner->wait(); - delete mInputRunner; - delete mInput; + m_input->stopInputEventLoop(); + m_input->wait(); } QPixmapData *QDirectFbIntegration::createPixmapData(QPixmapData::PixelType type) const @@ -123,24 +112,22 @@ QPixmapData *QDirectFbIntegration::createPixmapData(QPixmapData::PixelType type) if (type == QPixmapData::BitmapType) return new QRasterPixmapData(type); else - return new QDirectFbBlitterPixmapData; + return new QDirectFbBlitterPlatformPixmap; } -QPlatformWindow *QDirectFbIntegration::createPlatformWindow(QWidget *widget, WId winId) const +QPlatformWindow *QDirectFbIntegration::createPlatformWindow(QWidget *window, WId) const { - Q_UNUSED(winId); - QDirectFbInput *input = const_cast(mInput);//gah - return new QDirectFbWindow(widget,input); + return new QDirectFbWindow(window,m_input.data()); } -QWindowSurface *QDirectFbIntegration::createWindowSurface(QWidget *widget, WId winId) const +QWindowSurface *QDirectFbIntegration::createWindowSurface(QWidget *window, WId) const { - return new QDirectFbWindowSurface(widget,winId); + return new QDirectFbWindowSurface(window); } QPlatformFontDatabase *QDirectFbIntegration::fontDatabase() const { - return mFontDb; + return m_fontDb.data(); } QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.h b/src/plugins/platforms/directfb/qdirectfbintegration.h index 0e8337a..93e3d60 100644 --- a/src/plugins/platforms/directfb/qdirectfbintegration.h +++ b/src/plugins/platforms/directfb/qdirectfbintegration.h @@ -43,6 +43,7 @@ #define QPLATFORMINTEGRATION_DIRECTFB_H #include "qdirectfbinput.h" +#include "qdirectfbscreen.h" #include #include @@ -51,32 +52,6 @@ QT_BEGIN_NAMESPACE class QThread; -class QDirectFBCursor; - -class QDirectFbScreen : public QPlatformScreen -{ -Q_OBJECT -public: - QDirectFbScreen(int display); - ~QDirectFbScreen(); - - QRect geometry() const { return m_geometry; } - int depth() const { return m_depth; } - QImage::Format format() const { return m_format; } - QSize physicalSize() const { return m_physicalSize; } - -public: - QRect m_geometry; - int m_depth; - QImage::Format m_format; - QSize m_physicalSize; - - IDirectFBDisplayLayer *m_layer; - -private: - QDirectFBCursor * cursor; - -}; class QDirectFbIntegration : public QPlatformIntegration { @@ -92,11 +67,20 @@ public: QPlatformFontDatabase *fontDatabase() const; -private: + void initialize(); + +protected: + virtual void initializeDirectFB(); + virtual void initializeScreen(); + virtual void initializeInput(); + +protected: QList mScreens; - QDirectFbInput *mInput; - QThread *mInputRunner; - QPlatformFontDatabase *mFontDb; + QDirectFBPointer m_dfb; + QScopedPointer m_primaryScreen; + QScopedPointer m_input; + QScopedPointer m_inputRunner; + QScopedPointer m_fontDb; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbscreen.cpp b/src/plugins/platforms/directfb/qdirectfbscreen.cpp new file mode 100644 index 0000000..1d4b701 --- /dev/null +++ b/src/plugins/platforms/directfb/qdirectfbscreen.cpp @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdirectfbscreen.h" +#include "qdirectfbcursor.h" + +QT_BEGIN_NAMESPACE + +QDirectFbScreen::QDirectFbScreen(int display) + : QPlatformScreen() + , m_layer(QDirectFbConvenience::dfbDisplayLayer(display)) +{ + m_layer->SetCooperativeLevel(m_layer.data(), DLSCL_SHARED); + + DFBDisplayLayerConfig config; + m_layer->GetConfiguration(m_layer.data(), &config); + + m_format = QDirectFbConvenience::imageFormatFromSurfaceFormat(config.pixelformat, config.surface_caps); + m_geometry = QRect(0, 0, config.width, config.height); + const int dpi = 72; + const qreal inch = 25.4; + m_depth = QDirectFbConvenience::colorDepthForSurface(config.pixelformat); + m_physicalSize = QSize(config.width, config.height) * inch / dpi; + + m_cursor.reset(new QDirectFBCursor(this)); +} + +IDirectFBDisplayLayer *QDirectFbScreen::dfbLayer() const +{ + return m_layer.data(); +} + + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbscreen.h b/src/plugins/platforms/directfb/qdirectfbscreen.h new file mode 100644 index 0000000..1ec3a48 --- /dev/null +++ b/src/plugins/platforms/directfb/qdirectfbscreen.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDIRECTFBSCREEN_H +#define QDIRECTFBSCREEN_H + +#include "qdirectfbconvenience.h" +#include "qdirectfbcursor.h" + +#include + +#include + +QT_BEGIN_NAMESPACE + + +class QDirectFbScreen : public QPlatformScreen +{ +public: + QDirectFbScreen(int display); + + QRect geometry() const { return m_geometry; } + int depth() const { return m_depth; } + QImage::Format format() const { return m_format; } + QSize physicalSize() const { return m_physicalSize; } + + // DirectFb helpers + IDirectFBDisplayLayer *dfbLayer() const; + +public: + QRect m_geometry; + int m_depth; + QImage::Format m_format; + QSize m_physicalSize; + + QDirectFBPointer m_layer; + +private: + QScopedPointer m_cursor; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/platforms/directfb/qdirectfbwindow.cpp b/src/plugins/platforms/directfb/qdirectfbwindow.cpp index d2c411e..0b6be91 100644 --- a/src/plugins/platforms/directfb/qdirectfbwindow.cpp +++ b/src/plugins/platforms/directfb/qdirectfbwindow.cpp @@ -40,21 +40,23 @@ ****************************************************************************/ #include "qdirectfbwindow.h" +#include "qdirectfbwindowsurface.h" #include "qdirectfbinput.h" -#include "qdirectfbglcontext.h" - -#include +#include "qdirectfbscreen.h" -#include "qdirectfbwindowsurface.h" #include +QT_BEGIN_NAMESPACE + QDirectFbWindow::QDirectFbWindow(QWidget *tlw, QDirectFbInput *inputhandler) - : QPlatformWindow(tlw), m_inputHandler(inputhandler), m_context(0) + : QPlatformWindow(tlw), m_inputHandler(inputhandler) { - IDirectFBDisplayLayer *layer = QDirectFbConvenience::dfbDisplayLayer(); DFBDisplayLayerConfig layerConfig; - layer->GetConfiguration(layer,&layerConfig); + IDirectFBDisplayLayer *layer; + + layer = toDfbScreen(tlw)->dfbLayer(); + toDfbScreen(tlw)->dfbLayer()->GetConfiguration(layer, &layerConfig); DFBWindowDescription description; memset(&description,0,sizeof(DFBWindowDescription)); @@ -63,10 +65,10 @@ QDirectFbWindow::QDirectFbWindow(QWidget *tlw, QDirectFbInput *inputhandler) |DWDESC_OPTIONS #endif |DWDESC_CAPS); - description.width = tlw->rect().width(); - description.height = tlw->rect().height(); - description.posx = tlw->rect().x(); - description.posy = tlw->rect().y(); + description.width = tlw->width(); + description.height = tlw->height(); + description.posx = tlw->x(); + description.posy = tlw->y(); if (layerConfig.surface_caps & DSCAPS_PREMULTIPLIED) description.surface_caps = DSCAPS_PREMULTIPLIED; @@ -78,34 +80,32 @@ QDirectFbWindow::QDirectFbWindow(QWidget *tlw, QDirectFbInput *inputhandler) description.caps = DFBWindowCapabilities(DWCAPS_DOUBLEBUFFER|DWCAPS_ALPHACHANNEL); description.surface_caps = DSCAPS_PREMULTIPLIED; - DFBResult result = layer->CreateWindow(layer,&description,&m_dfbWindow); + DFBResult result = layer->CreateWindow(layer, &description, m_dfbWindow.outPtr()); if (result != DFB_OK) { DirectFBError("QDirectFbGraphicsSystemScreen: failed to create window",result); } - m_dfbWindow->SetOpacity(m_dfbWindow,0xff); + m_dfbWindow->SetOpacity(m_dfbWindow.data(), 0xff); setVisible(widget()->isVisible()); - DFBWindowID id; - m_dfbWindow->GetID(m_dfbWindow, &id); - m_inputHandler->addWindow(id,tlw); + m_inputHandler->addWindow(m_dfbWindow.data(), tlw); } QDirectFbWindow::~QDirectFbWindow() { - m_inputHandler->removeWindow(winId()); - m_dfbWindow->Destroy(m_dfbWindow); + m_inputHandler->removeWindow(m_dfbWindow.data()); + m_dfbWindow->Destroy(m_dfbWindow.data()); } void QDirectFbWindow::setGeometry(const QRect &rect) { bool isMoveOnly = (rect.topLeft() != geometry().topLeft()) && (rect.size() == geometry().size()); + QPlatformWindow::setGeometry(rect); if (widget()->isVisible() && !(widget()->testAttribute(Qt::WA_DontShowOnScreen))) { - m_dfbWindow->SetBounds(m_dfbWindow, rect.x(),rect.y(), + m_dfbWindow->SetBounds(m_dfbWindow.data(), rect.x(),rect.y(), rect.width(), rect.height()); - //Hack. When moving since the WindowSurface of a window becomes invalid when moved if (isMoveOnly) { //if resize then windowsurface is updated. widget()->windowSurface()->resize(rect.size()); @@ -117,7 +117,7 @@ void QDirectFbWindow::setGeometry(const QRect &rect) void QDirectFbWindow::setOpacity(qreal level) { const quint8 windowOpacity = quint8(level * 0xff); - m_dfbWindow->SetOpacity(m_dfbWindow,windowOpacity); + m_dfbWindow->SetOpacity(m_dfbWindow.data(), windowOpacity); } void QDirectFbWindow::setVisible(bool visible) @@ -125,14 +125,14 @@ void QDirectFbWindow::setVisible(bool visible) if (visible) { int x = geometry().x(); int y = geometry().y(); - m_dfbWindow->MoveTo(m_dfbWindow,x,y); + m_dfbWindow->MoveTo(m_dfbWindow.data(), x, y); } else { - IDirectFBDisplayLayer *displayLayer; - QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),DLID_PRIMARY,&displayLayer); + QDirectFBPointer displayLayer; + QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(), DLID_PRIMARY, displayLayer.outPtr()); DFBDisplayLayerConfig config; - displayLayer->GetConfiguration(displayLayer,&config); - m_dfbWindow->MoveTo(m_dfbWindow,config.width+1,config.height + 1); + displayLayer->GetConfiguration(displayLayer.data(), &config); + m_dfbWindow->MoveTo(m_dfbWindow.data(), config. width + 1, config.height + 1); } } @@ -141,51 +141,73 @@ Qt::WindowFlags QDirectFbWindow::setWindowFlags(Qt::WindowFlags flags) switch (flags & Qt::WindowType_Mask) { case Qt::ToolTip: { DFBWindowOptions options; - m_dfbWindow->GetOptions(m_dfbWindow,&options); + m_dfbWindow->GetOptions(m_dfbWindow.data(), &options); options = DFBWindowOptions(options | DWOP_GHOST); - m_dfbWindow->SetOptions(m_dfbWindow,options); + m_dfbWindow->SetOptions(m_dfbWindow.data(), options); break; } default: break; } - m_dfbWindow->SetStackingClass(m_dfbWindow, flags & Qt::WindowStaysOnTopHint ? DWSC_UPPER : DWSC_MIDDLE); + m_dfbWindow->SetStackingClass(m_dfbWindow.data(), flags & Qt::WindowStaysOnTopHint ? DWSC_UPPER : DWSC_MIDDLE); return flags; } void QDirectFbWindow::raise() { - m_dfbWindow->RaiseToTop(m_dfbWindow); + m_dfbWindow->RaiseToTop(m_dfbWindow.data()); } void QDirectFbWindow::lower() { - m_dfbWindow->LowerToBottom(m_dfbWindow); + m_dfbWindow->LowerToBottom(m_dfbWindow.data()); } WId QDirectFbWindow::winId() const { DFBWindowID id; - m_dfbWindow->GetID(m_dfbWindow, &id); + m_dfbWindow->GetID(m_dfbWindow.data(), &id); return WId(id); } -QPlatformGLContext *QDirectFbWindow::glContext() const +bool QDirectFbWindow::setKeyboardGrabEnabled(bool grab) { - if (!m_context) { - IDirectFBSurface *surface; - DFBResult result = m_dfbWindow->GetSurface(m_dfbWindow,&surface); - if (result != DFB_OK) { - qWarning("could not retrieve surface in QDirectFbWindow::glContext()"); - return 0; - } - IDirectFBGL *gl; - result = surface->GetGL(surface,&gl); - if (result != DFB_OK) { - qWarning("could not retrieve IDirectFBGL in QDirectFbWindow::glContext()"); - return 0; - } - const_cast(this)->m_context = new QDirectFbGLContext(gl); + DFBResult res; + + if (grab) + res = m_dfbWindow->GrabKeyboard(m_dfbWindow.data()); + else + res = m_dfbWindow->UngrabKeyboard(m_dfbWindow.data()); + + return res == DFB_OK; +} + +bool QDirectFbWindow::setMouseGrabEnabled(bool grab) +{ + DFBResult res; + + if (grab) + res = m_dfbWindow->GrabPointer(m_dfbWindow.data()); + else + res = m_dfbWindow->UngrabPointer(m_dfbWindow.data()); + + return res == DFB_OK; +} + +IDirectFBWindow *QDirectFbWindow::dfbWindow() const +{ + return m_dfbWindow.data(); +} + +IDirectFBSurface *QDirectFbWindow::dfbSurface() +{ + if (!m_dfbSurface) { + DFBResult res = m_dfbWindow->GetSurface(m_dfbWindow.data(), m_dfbSurface.outPtr()); + if (res != DFB_OK) + DirectFBError(QDFB_PRETTY, res); } - return m_context; + + return m_dfbSurface.data(); } + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbwindow.h b/src/plugins/platforms/directfb/qdirectfbwindow.h index 4f839a0..349d8c8 100644 --- a/src/plugins/platforms/directfb/qdirectfbwindow.h +++ b/src/plugins/platforms/directfb/qdirectfbwindow.h @@ -61,17 +61,21 @@ public: void setVisible(bool visible); Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags); + bool setKeyboardGrabEnabled(bool grab); + bool setMouseGrabEnabled(bool grab); void raise(); void lower(); WId winId() const; - QPlatformGLContext *glContext() const; + IDirectFBWindow *dfbWindow() const; + + // helper to get access to DirectFB types + IDirectFBSurface *dfbSurface(); private: - IDirectFBWindow *m_dfbWindow; + QDirectFBPointer m_dfbSurface; + QDirectFBPointer m_dfbWindow; QDirectFbInput *m_inputHandler; - - QPlatformGLContext *m_context; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/directfb/qdirectfbwindowsurface.cpp b/src/plugins/platforms/directfb/qdirectfbwindowsurface.cpp index 730f01f..bf98e1d 100644 --- a/src/plugins/platforms/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/platforms/directfb/qdirectfbwindowsurface.cpp @@ -43,39 +43,29 @@ #include "qdirectfbintegration.h" #include "qdirectfbblitter.h" #include "qdirectfbconvenience.h" +#include "qdirectfbwindow.h" #include #include QT_BEGIN_NAMESPACE -QDirectFbWindowSurface::QDirectFbWindowSurface(QWidget *window, WId wId) - : QWindowSurface(window), m_pixmap(0), m_pmdata(0), m_dfbSurface(0) +QDirectFbWindowSurface::QDirectFbWindowSurface(QWidget *window) + : QWindowSurface(window), m_pixmap(0), m_pmdata(0) { + IDirectFBWindow *dfbWindow = static_cast(window->platformWindow())->dfbWindow(); + dfbWindow->GetSurface(dfbWindow, m_dfbSurface.outPtr()); - IDirectFBDisplayLayer *layer = QDirectFbConvenience::dfbDisplayLayer(); - - DFBWindowID id(wId); - IDirectFBWindow *dfbWindow; - - layer->GetWindow(layer,id,&dfbWindow); - - dfbWindow->GetSurface(dfbWindow,&m_dfbSurface); //WRONGSIZE - QDirectFbBlitter *blitter = new QDirectFbBlitter(window->rect().size(), m_dfbSurface); - m_pmdata = new QDirectFbBlitterPixmapData; + QDirectFbBlitter *blitter = new QDirectFbBlitter(window->size(), m_dfbSurface.data()); + m_pmdata = new QDirectFbBlitterPlatformPixmap; m_pmdata->setBlittable(blitter); - m_pixmap = new QPixmap(m_pmdata); -} - -QDirectFbWindowSurface::~QDirectFbWindowSurface() -{ - delete m_pixmap; + m_pixmap.reset(new QPixmap(m_pmdata)); } QPaintDevice *QDirectFbWindowSurface::paintDevice() { - return m_pixmap; + return m_pixmap.data(); } void QDirectFbWindowSurface::flush(QWidget *widget, const QRegion ®ion, const QPoint &offset) @@ -87,17 +77,13 @@ void QDirectFbWindowSurface::flush(QWidget *widget, const QRegion ®ion, const for (int i = 0 ; i < rects.size(); i++) { const QRect rect = rects.at(i); DFBRegion dfbReg = { rect.x() + offset.x(),rect.y() + offset.y(),rect.right() + offset.x(),rect.bottom() + offset.y()}; - m_dfbSurface->Flip(m_dfbSurface, &dfbReg, DFBSurfaceFlipFlags(DSFLIP_BLIT|DSFLIP_ONSYNC)); + m_dfbSurface->Flip(m_dfbSurface.data(), &dfbReg, DFBSurfaceFlipFlags(DSFLIP_BLIT|DSFLIP_ONSYNC)); } } void QDirectFbWindowSurface::resize(const QSize &size) { - QWindowSurface::resize(size); - - //Have to add 1 ref ass it will be removed by deleting the old blitter in setBlittable - m_dfbSurface->AddRef(m_dfbSurface); - QDirectFbBlitter *blitter = new QDirectFbBlitter(size,m_dfbSurface); + QDirectFbBlitter *blitter = new QDirectFbBlitter(size, m_dfbSurface.data()); m_pmdata->setBlittable(blitter); } @@ -115,14 +101,14 @@ bool QDirectFbWindowSurface::scroll(const QRegion &area, int dx, int dy) if (!m_dfbSurface || area.isEmpty()) return false; - m_dfbSurface->SetBlittingFlags(m_dfbSurface, DSBLIT_NOFX); + m_dfbSurface->SetBlittingFlags(m_dfbSurface.data(), DSBLIT_NOFX); if (area.rectCount() == 1) { - scrollSurface(m_dfbSurface, area.boundingRect(), dx, dy); + scrollSurface(m_dfbSurface.data(), area.boundingRect(), dx, dy); } else { const QVector rects = area.rects(); const int n = rects.size(); for (int i=0; i #include - #include +#include "qdirectfbconvenience.h" + QT_BEGIN_NAMESPACE class QDirectFbWindowSurface : public QWindowSurface { public: - QDirectFbWindowSurface(QWidget *window, WId wid); - ~QDirectFbWindowSurface(); + QDirectFbWindowSurface(QWidget *window); QPaintDevice *paintDevice(); void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset); @@ -66,10 +66,9 @@ public: private: void lockSurfaceToImage(); - QPixmap *m_pixmap; + QScopedPointer m_pixmap; QBlittablePixmapData *m_pmdata; - - IDirectFBSurface *m_dfbSurface; + QDirectFBPointer m_dfbSurface; }; QT_END_NAMESPACE -- cgit v0.12 From b249e4c32d697ef56c196bb2a14a18319100f127 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 13 Dec 2011 12:24:14 +0000 Subject: Default to QDir::homePath() in Symbian native file dialogs Symbian places restrictions on the directories in which the native file dialog can browse. If the path passed to QFileDialog::getXxxFileName() is inaccessible, the implementation defaults to a path which is accessible. Previously, this default path was QDir::rootPath(). Changes to the Symbian file engine in Qt 4.8 mean that this now returns "C:\" which is inaccesible to the file dialog. This patch changes the default path to QDir::homePath(), which returns "C:\data". Task-number: ou1cimx1#947939 Reviewed-by: Miikka Heikkinen --- src/gui/dialogs/qfiledialog_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index 1ffbf1d..01c7b9b 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -143,8 +143,8 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st tryCount = 0; } else { // Symbian native file dialog doesn't allow accessing files outside C:/Data - // It will always leave in that case, so default into QDir::rootPath() in error cases. - QString dir = QDir::toNativeSeparators(QDir::rootPath()); + // It will always leave in that case, so default into QDir::homePath() in error cases. + QString dir = QDir::toNativeSeparators(QDir::homePath()); startFolder = qt_QString2TPtrC(dir); } } -- cgit v0.12 -- cgit v0.12 From 00bbab0dbfde79cfc6a3dc6060d7c87763f07482 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Tue, 13 Dec 2011 15:09:16 +0100 Subject: Fix Memoy leak relateded to contextmenu. From Qt4.7 on, the contextmenu of QTextEdit/QPlainTextEdit/QLineEdit/QLabel/QMainWindow etc using QMenu::popup() instead of QMenu::exec(), but the setAttribute(Qt::WA_DeleteOnClose) does not work, as QMenu::close() isn't called when the menus disapper. And this causes a memory leak. Task-number: QTBUG-22817 Merge-request: 2721 Reviewed-by: Frederik Gladhorn --- src/gui/widgets/qmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index a490286..eb57caa 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -513,7 +513,7 @@ void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister) menu->blockSignals(false); #endif // QT_NO_EFFECTS if (!justRegister) - menu->hide(); + menu->close(); } void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst) -- cgit v0.12 From d0ad4ddc870930cdf87bbded20a780a3548a5e5c Mon Sep 17 00:00:00 2001 From: Marcelino Villarino Date: Tue, 13 Dec 2011 19:56:14 +0100 Subject: I18n: Updates galician translation (4.8) Merge-request: 1493 Reviewed-by: Oswald Buddenhagen --- translations/qt_gl.ts | 825 +++++++++++++++++++++++++++++++++++++-------- translations/qt_help_gl.ts | 28 +- 2 files changed, 698 insertions(+), 155 deletions(-) diff --git a/translations/qt_gl.ts b/translations/qt_gl.ts index a77bcc7..96b47ae 100644 --- a/translations/qt_gl.ts +++ b/translations/qt_gl.ts @@ -9,9 +9,24 @@ + Debugger::JSAgentWatchData + + [Array of length %1] + [Array de longitude %1] + + + <undefined> + <non definido> + + + FakeReply Fake error ! + Erro falso! + + + Fake error! Erro falso! @@ -111,7 +126,7 @@ máis preferencia ou está configurado especificamente para este fluxo.</html Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled Aviso: Non semella ter instalados os complementos básicos de GStreamer. - Desactivouse todo o soporte de son e vídeo + Desactivouse toda a compatibilidade con son e vídeo @@ -152,7 +167,7 @@ reproducir este contido: %0 Could not open audio device. The device is already in use. - Non foi posíbel abrir o dispositivo de audio. O dispositivo xa está en uso. + Non foi posíbel abrir o dispositivo de son; Xa está en uso. Could not decode media source. @@ -183,7 +198,7 @@ reproducir este contido: %0 Not supported - Non soportado + Non admitido Overflow @@ -239,7 +254,7 @@ reproducir este contido: %0 Streaming not supported - Non está soportada a retransmisión + Non permite utilizar retransmisións Server alert @@ -263,7 +278,7 @@ reproducir este contido: %0 Proxy server not supported - O servidor proxy non está soportado + Non se permite utilizar servidor proxy Audio output error @@ -326,7 +341,7 @@ reproducir este contido: %0 Download error - + Aconteceu un erro ao descargar @@ -400,7 +415,7 @@ reproducir este contido: %0 Reflections delay (ms) - ReflectionsDelay: Amount of delay between the arrival the direct path from the source and the arrival of the first reflection. + ReflectionsDelay: Amount of delay between the arrival of the direct path from the source and the arrival of the first reflection. Retardo dos reflexos (ms) @@ -415,7 +430,7 @@ reproducir este contido: %0 Reverb level (mB) - ReverbLevel Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude. + ReverbLevel: Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude. Nivel da reverberación (mB) @@ -433,7 +448,7 @@ reproducir este contido: %0 Phonon::MMF::MediaObject Error opening source: type not supported - Erro ao abrir a fonte: tipo non soportado + Erro ao abrir a fonte: tipo non admitido Error opening source: resource is compressed @@ -449,7 +464,7 @@ reproducir este contido: %0 Failed to set requested IAP - + Fallou a definición da IAP pedida @@ -473,8 +488,12 @@ reproducir este contido: %0 Volume: %1% + Use this slider to adjust the volume. The leftmost position is 0%. The rightmost is %1% + Use esta barra deslizante para axustar o volume. A posición da esquerda é o 0%, a da dereita o %1% + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - Use esta barra deslizante para axustar o volume. A posición da esquerda é o + Use esta barra deslizante para axustar o volume. A posición da esquerda é o 0%, a da dereita o %1% @@ -756,7 +775,7 @@ File not found. Check path and filename. %1 Non se atopou o ficheiro. -Verifique a ruta e o nome do ficheiro. +Comprobe a ruta e o nome do ficheiro. All Files (*.*) @@ -828,7 +847,7 @@ para Q3NetworkProtocol Operation stopped by the user - Operación interrompida polo usuario + Operación detida polo usuario @@ -958,35 +977,35 @@ para Q3UrlOperator The protocol `%1' is not supported - O protocolo «%1» non está soportado. + Non se permite utilizar o protocolo «%1» The protocol `%1' does not support listing directories - O protocolo «%1» non soporta sacar listaxes de cartafoles + O protocolo «%1» non permite sacar listaxes de cartafoles The protocol `%1' does not support creating new directories - O protocolo «%1» non soporta crear cartafoles novos + O protocolo «%1» non permite crear cartafoles novos The protocol `%1' does not support removing files or directories - O protocolo «%1» non soporta eliminar nin ficheiros nin cartafoles + O protocolo «%1» non permite eliminar nin ficheiros nin cartafoles The protocol `%1' does not support renaming files or directories - O protocolo «%1» non soporta mudar o nome dos ficheiros nin dos cartafoles + O protocolo «%1» non permite mudar o nome dos ficheiros nin dos cartafoles The protocol `%1' does not support getting files - O protocolo «%1» non soporta obter ficheiros + O protocolo «%1» non permite obter ficheiros The protocol `%1' does not support putting files - O protocolo «%1» non soporta enviar ficheiros + O protocolo «%1» non permite enviar ficheiros The protocol `%1' does not support copying or moving files or directories - O protocolo «%1» non soporta copiar nin mover nin ficheiros nin cartafoles + O protocolo «%1» non permite copiar nin mover nin ficheiros nin cartafoles (unknown) @@ -1024,7 +1043,7 @@ para Operation on socket is not supported - A operación no socket non está soportada + Non se permite usar a operación no socket Host not found @@ -1065,6 +1084,14 @@ para QAccessibleButton + Uncheck + Desmarcar + + + Check + Marcar + + Press Premer @@ -1213,7 +1240,7 @@ para %1: permission denied QSystemSemaphore - %1: negouse o permiso + %1: negouse o permiso %1: unknown error %2 @@ -1244,15 +1271,15 @@ para Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción Unable to set autocommit - Non foi posíbel activar a entrega automática + Non foi posíbel activar a remisión automática @@ -1379,7 +1406,14 @@ superior, inferior nin vcenter. QDeclarativeAnimatedImage Qt was built without support for QMovie - Qt construíuse sen soporte para QMovie + Qt construíuse sen a implementación de QMovie + + + + QDeclarativeApplication + + Application is an abstract class + A aplicación é unha clase abstracta @@ -1510,6 +1544,14 @@ superior, inferior nin vcenter. Non se pode crear unha especificación de compoñente baleira + "%1.%2" is not available in %3 %4.%5. + «%1.%2» non está dispoñíbel en %3 %4 %5. + + + "%1.%2" is not available due to component versioning. + «%1.%2» non está dispoñíbel debido ás versións das compoñentes. + + Incorrectly specified signal assignment Especificouse incorrectamente a asignación de sinal @@ -1607,7 +1649,7 @@ superior, inferior nin vcenter. Cannot assign multiple values to a singular property - + Non se poden asignar varios valores a unha propiedade singular Cannot assign object to property @@ -1703,20 +1745,20 @@ superior, inferior nin vcenter. Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property> - + Referencia non válida a un alcume. Unha referencia a un alcume debe indicarse como <id>, <id> <property> ou como <id>.<value.property>.<property> Alias property exceeds alias bounds - - - - Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> - Referencia non válida a un alcume. Unha referencia a un alcume debe indicarse como <id> ou como <id>.<propiedade> + A propiedade do alcume excede os límite do alcume Invalid alias reference. Unable to find id "%1" Referencia non válida a un alcume. Non foi posíbel atopar o id «%1» + + Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> + Referencia non válida a un alcume. Unha referencia a un alcume debe indicarse como <id> ou como <id>.<propiedade> + QDeclarativeComponent @@ -1724,6 +1766,10 @@ superior, inferior nin vcenter. Invalid empty URL URL baleiro non válido + + createObject: value is not an object + createObject: o valor non é un obxecto + QDeclarativeCompositeTypeManager @@ -1805,11 +1851,11 @@ superior, inferior nin vcenter. QDeclarativeImportDatabase cannot load module "%1": File name case mismatch for "%2" - + non se pode cargar o módulo «%1»: non coinciden as maiúsculas do nome do ficheiro «%2» module "%1" definition "%2" not readable - a definición «%2» no módulo «%1» non é lexíbel + a definición «%2» no módulo «%1» non é lexíbel plugin cannot be loaded for module "%1": %2 @@ -1864,8 +1910,12 @@ superior, inferior nin vcenter. non é un tipo + File name case mismatch for "%1" + Non casan as maiúculas do nome do ficheiro «%1» + + File name case mismatch for "%2" - + Non casan as maiúculas do nome do ficheiro «%2» @@ -1883,6 +1933,17 @@ superior, inferior nin vcenter. + QDeclarativeLayoutMirroringAttached + + LayoutDirection attached property only works with Items + A propriedade anexa LayoutDirection só funciona con «Items» + + + LayoutMirroring is only available via attached properties + LayoutMirroring só está dispoñíbel a través das propiedades anexas + + + QDeclarativeListModel remove: index %1 out of range @@ -1981,16 +2042,12 @@ superior, inferior nin vcenter. Cadea non pechada no fin dunha liña - Illegal escape squence - Secuencia de escape ilegal - - Illegal escape sequence Secuencia de escape ilegal Unclosed comment at end of file - Comentario non pechado ao final dunha liña + Comentario non pechado ao final dun ficheiro Illegal syntax for exponential number @@ -2022,7 +2079,7 @@ superior, inferior nin vcenter. Unexpected token `%1' - Token «%1» non agardado. + Token «%1» non agardado Expected token `%1' @@ -2074,12 +2131,16 @@ superior, inferior nin vcenter. Readonly not yet supported - Aínda non se soporta o só para lectura + Aínda non se permite utilizar só para lectura JavaScript declaration outside Script element Declaración de JavaScript fora dun elemento Script + + Illegal escape squence + Secuencia de escape ilegal + QDeclarativePauseAnimation @@ -2114,7 +2175,7 @@ superior, inferior nin vcenter. QDeclarativePropertyChanges PropertyChanges does not support creating state-specific objects. - PropertyChanges non soporta crear obxectos específicos dun estado. + PropertyChanges non permite crear obxectos específicos dun estado. Cannot assign to non-existent property "%1" @@ -2140,19 +2201,19 @@ superior, inferior nin vcenter. QDeclarativeTypeLoader Script %1 unavailable - + O script %1 non está dispoñíbel Type %1 unavailable - O tipo %1 non está dispoñíbel + O tipo %1 non está dispoñíbel Namespace %1 cannot be used as a type - O espazo de nomes %1 non se pode empregar como un tipo + O espazo de nomes %1 non se pode empregar como un tipo %1 %2 - %1 %2 + %1 %2 @@ -2198,14 +2259,14 @@ superior, inferior nin vcenter. QDeclarativeVisualDataModel Delegate component must be Item type. - O compoñente delegado debe ser do tipo Item. + O compoñente delegado debe ser do tipo «Item». QDeclarativeXmlListModel Qt was built without support for xmlpatterns - Qt construíuse sen soporte para xmlpatterns + Qt construíuse sen implementación de xmlpatterns @@ -2332,7 +2393,7 @@ superior, inferior nin vcenter. Abort - Abortar + Interromper Retry @@ -2441,16 +2502,20 @@ superior, inferior nin vcenter. Cannot open for output - Non foi posíbel abrir o ficheiro de saída + Non foi posíbel abrir para saída Failure to write block - Non foi posíbel escribir o bloque + Fallou a escrita do bloque Cannot create %1 for output Non foi posíbel crear %1 para a saída + + No file engine available or engine does not support UnMapExtension + Ou non hai dispoñíbel ningún motor de ficheiros ou o motor non admite UnMapExtension + QFileDialog @@ -2628,7 +2693,7 @@ Desexa aínda así borralo? Drive - Dispositivo + Unidade File @@ -2991,7 +3056,7 @@ Desexa aínda así borralo? Downloading file failed: %1 - Fallou a obtención do ficheiro: + Fallou a descarga do ficheiro: %1 @@ -3105,7 +3170,7 @@ Desexa aínda así borralo? HTTPS connection requested but SSL support not compiled in - Pediuse unha conexión HTTPS pero non se compilou con soporte de SSL + Pediuse unha conexión HTTPS pero non se compilou con implementación de SSL Unknown error @@ -3113,7 +3178,7 @@ Desexa aínda así borralo? Request aborted - Pedido abortado + Interrompeuse o pedido No server set to connect to @@ -3235,11 +3300,11 @@ Desexa aínda así borralo? Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción @@ -3278,7 +3343,7 @@ Desexa aínda así borralo? Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Could not allocate statement @@ -3373,18 +3438,10 @@ Desexa aínda así borralo? QLibrary - Could not mmap '%1': %2 - Non foi posíbel mmap «%1»: %2 - - Plugin verification data mismatch in '%1' Erro de concordancia na verificación dos datos do complemento en «%1» - Could not unmap '%1': %2 - Non foi posíbel unmap «%1»: %2 - - The shared library was not found. Non se atopou a biblioteca compartida. @@ -3421,6 +3478,26 @@ chave de compilación «%2», obtívose a «%3» Cannot resolve symbol "%1" in %2: %3 Non é posíbel resolver o símbolo «%1» en %2: %3 + + Could not mmap '%1': %2 + Non foi posíbel mmap «%1»: %2 + + + Could not unmap '%1': %2 + Non foi posíbel unmap «%1»: %2 + + + '%1' is not an ELF object (%2) + «%1» non é un obxecto ELF (%2) + + + '%1' is not an ELF object + «%1» non é un obxecto ELF + + + '%1' is an invalid ELF object (%2) + «%1» non é un obxecto ELF válido (%2) + QLineEdit @@ -3508,7 +3585,7 @@ chave de compilación «%2», obtívose a «%3» %1: The socket operation is not supported - %1: A operación do socket non está soportada + %1: Non se permite utilizar a operación do socket %1: Unknown error @@ -3518,6 +3595,10 @@ chave de compilación «%2», obtívose a «%3» %1: Unknown error %2 %1: Erro descoñecido %2 + + %1: Access denied + %1: acceso denegado + QMYSQLDriver @@ -3535,11 +3616,11 @@ chave de compilación «%2», obtívose a «%3» Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción @@ -3692,6 +3773,10 @@ chave de compilación «%2», obtívose a «%3» Actions Accións + + Corner Toolbar + Barra de ferramentas da esquina + QMessageBox @@ -3763,7 +3848,7 @@ texto Attempt to use IPv6 socket on a platform with no IPv6 support - Tentouse usar soporte de socket IPv6 nunha plataforma en soporte de IPv6 + Tentouse usar un socket IPv6 nunha plataforma sen implementación de IPv6 The remote host closed the connection @@ -3783,7 +3868,7 @@ texto Protocol type not supported - Tipo de protocolo non soportado + Non se permite utilizar ese tipo de protocolo Invalid socket descriptor @@ -3811,7 +3896,7 @@ texto The bound address is already in use - O enderezo de conexión xa está en uso + O enderezo vinculado xa está en uso The address is not available @@ -3869,7 +3954,7 @@ texto QNetworkAccessDataBackend Operation not supported on %1 - Operación non soportada en %1 + Operación non admitida en %1 Invalid URI: %1 @@ -3930,7 +4015,7 @@ texto Error while downloading %1: %2 - Aconteceu un erro ao obter %1: %2 + Aconteceu un erro ao descargar %1: %2 Error while uploading %1: %2 @@ -3955,7 +4040,7 @@ texto QNetworkReply Error downloading %1 - server replied: %2 - Aconteceu un erro ao obter %1, o servidor respondeu: %2 + Aconteceu un erro ao descargar %1, o servidor respondeu: %2 Protocol "%1" is unknown @@ -3966,6 +4051,10 @@ texto Erro da sesión de rede. + backend start error. + fallou o inicio da infraestrutura + + Temporary network failure. Fallo temporal da rede. @@ -3992,7 +4081,7 @@ texto Session aborted by user or system - A sesión abortouse polo usuario ou polo sistema + A sesión interrompeuse polo usuario ou polo sistema Unidentified Error @@ -4004,11 +4093,11 @@ texto The session was aborted by the user or system. - A sesión abortouse polo usuario ou polo sistema. + A sesión interrompeuse polo usuario ou polo sistema. The requested operation is not supported by the system. - A operación pedida non está soportada polo sistema. + O sistema non permite utilizar a operación pedida. The specified configuration cannot be used. @@ -4016,7 +4105,7 @@ texto Roaming was aborted or is not possible. - A itinerancia abortouse ou non é posíbel. + A itinerancia interrompeuse ou non é posíbel. @@ -4036,11 +4125,11 @@ texto Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción @@ -4086,7 +4175,7 @@ texto Unable to connect - Driver doesn't support all functionality required - Non foi posíbel conectar xa que o controlador non soporta todas as funcionalidades requiridas + Non foi posíbel conectar xa que o controlador non permite utilizar todas as funcionalidades requiridas Unable to disable autocommit @@ -4094,11 +4183,11 @@ texto Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción Unable to enable autocommit @@ -4114,7 +4203,7 @@ texto QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration QODBCResult::reset: Non foi posíbel estabelecer «SQL_CURSOR_STATIC» como -atributo da sentenza. Verifique a configuración do controlador ODBC +atributo da sentenza. Comprobe a configuración do controlador ODBC Unable to execute statement @@ -4159,6 +4248,50 @@ atributo da sentenza. Verifique a configuración do controlador ODBCPulseAudio Sound Server Servidor de son PulseAudio + + Host not found + Non se atopou o servidor + + + Could not read image data + Non foi posíbel ler os datos da imaxe + + + Sequential device (eg socket) for image read not supported + Non están implementados os dispositivos secuenciais (p.ex. socket) para ler imaxes + + + Seek file/device for image read failed + Fallou a busca de ficheiro ou dispositivo para ler imaxes + + + Image mHeader read failed + Fallou a lectura da mHeader da imaxe + + + Image type not supported + Tipo de imaxe non admitido + + + Image dpeth not valid + Profundidade da imaxe non válida + + + Could not seek to image read footer + Non foi posíbel buscar no pé de imaxe lido + + + Could not read footer + Non foi posíbel ler o pé + + + Image type (non-TrueVision 2.0) not supported + Tipo de imaxe non admitido (non TrueVision 2.0) + + + Could not reset to read data + Non foi posíbel reiniciar para ler os datos + QPPDOptionsModel @@ -4183,11 +4316,11 @@ atributo da sentenza. Verifique a configuración do controlador ODBC Could not commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Could not rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción Unable to subscribe @@ -4951,6 +5084,10 @@ Desexa sobrescribilo? sintaxe incorrecta para a procura cara diante + lookbehinds not supported, see QTBUG-2371 + non están implementadas as buscas por detrás, consulte QTBUG-2371 + + bad repetition syntax sintaxe incorrecta para a repetición @@ -4991,11 +5128,11 @@ Desexa sobrescribilo? Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción @@ -5025,11 +5162,11 @@ Desexa sobrescribilo? Unable to commit transaction - Non foi posíbel entregar a transacción + Non foi posíbel remitir a transacción Unable to rollback transaction - Non foi posíbel anular a transacción + Non foi posíbel regresar a transacción @@ -5173,7 +5310,7 @@ Desexa sobrescribilo? Clear Error Log - Limpar a saída de erros + Limpar o rexistro de erros Clear Console @@ -5445,7 +5582,7 @@ Desexa sobrescribilo? %1: key error - %1: erro de chave + %1: erro de chave %1: unable to make key @@ -5472,6 +5609,10 @@ Desexa sobrescribilo? %1: restricións de tamaño impostas polo sistema + %1: bad name + %1: nome non válido + + %1: not attached %1: non anexado @@ -5597,7 +5738,7 @@ Desexa sobrescribilo? Refresh - Anovar + Actualizar Volume Down @@ -5687,71 +5828,71 @@ Desexa sobrescribilo? Launch Media - Lanzar Multimedia + Iniciar Multimedia Launch (0) - Lanzar (0) + Iniciar (0) Launch (1) - Lanzar (1) + Iniciar (1) Launch (2) - Lanzar (2) + Iniciar (2) Launch (3) - Lanzar (3) + Iniciar (3) Launch (4) - Lanzar (4) + Iniciar (4) Launch (5) - Lanzar (5) + Iniciar (5) Launch (6) - Lanzar (6) + Iniciar (6) Launch (7) - Lanzar (7) + Iniciar (7) Launch (8) - Lanzar (8) + Iniciar (8) Launch (9) - Lanzar (9) + Iniciar (9) Launch (A) - Lanzar (A) + Iniciar (A) Launch (B) - Lanzar (B) + Iniciar (B) Launch (C) - Lanzar (C) + Iniciar (C) Launch (D) - Lanzar (D) + Iniciar (D) Launch (E) - Lanzar (E) + Iniciar (E) Launch (F) - Lanzar (F) + Iniciar (F) Monitor Brightness Up @@ -6432,11 +6573,11 @@ Desexa sobrescribilo? SOCKSv5 command not supported - A orde SOCKSv5 non está soportada + Non se permite utilizar a orde SOCKSv5 Address type not supported - Tipo de enderezo non soportado + Tipo de enderezo non admitido Unknown SOCKSv5 proxy error code 0x%1 @@ -6451,6 +6592,10 @@ Desexa sobrescribilo? QSoftKeyManager Ok + Aceptar + + + OK Aceptar @@ -6619,6 +6764,10 @@ Desexa sobrescribilo? O nome do servidor non coincide con ningún dos válidos para este certificado + The peer certificate is blacklisted + O certificado do parceiro está na lista negra + + Unknown error Erro descoñecido @@ -6679,7 +6828,7 @@ Desexa sobrescribilo? Missing default state in history state '%1' - Falta o estado predeterminado no estado histórico «%1» + Falta o estado predeterminado no estado «%1» do historial No common ancestor for targets and source of transition from state '%1' @@ -6691,6 +6840,187 @@ Desexa sobrescribilo? + QSymSQLDriver + + Invalid option: + Opción non válida: + + + Error opening database + Aconteceu un erro ao abrir a base de datos + + + POLICY_DB_DEFAULT must be defined before any other POLICY definitions can be used + Debe definirse POLICY_DB_DEFAULT antes de poder usar calquera outra definición de POLICY + + + Unable to begin transaction + Non foi posíbel comezar a transacción + + + Unable to commit transaction + Non foi posíbel remitir a transacción + + + Unable to rollback transaction + Non foi posíbel regresar a transacción + + + + QSymSQLResult + + Error retrieving column count + Aconteceu un erro ao obter a cantidade de columnas + + + Error retrieving column name + Aconteceu un erro ao obter o nome da columna + + + Error retrieving column type + Aconteceu un erro ao obter o tipo da columna + + + Unable to fetch row + Non foi posíbel acadar a fila + + + Unable to execute statement + Non foi posíbel executar a sentenza + + + Statement is not prepared + A sentenza non está preparada + + + Unable to reset statement + Non foi posíbel reiniciar a sentenza + + + Unable to bind parameters + Non foi posíbel asociar os parámetros + + + Parameter count mismatch + O número de parámetros non coincide + + + + QSymbianSocketEngine + + Unable to initialize non-blocking socket + Non foi posíbel inicializar o socket non bloqueante + + + Unable to initialize broadcast socket + Non foi posíbel inicializar o socket de broadcast + + + Attempt to use IPv6 socket on a platform with no IPv6 support + Tentouse usar un socket IPv6 nunha plataforma sen implementación de IPv6 + + + The remote host closed the connection + O servidor remoto pechou a conexión + + + Network operation timed out + A operación de rede esgotou o tempo-límite + + + Out of resources + Esgotáronse os recursos + + + Unsupported socket operation + Operación de socket non admitida + + + Protocol type not supported + Non se permite utilizar ese tipo de protocolo + + + Invalid socket descriptor + Descritor de socket non válido + + + Host unreachable + Non foi posíbel acadar o servidor + + + Network unreachable + Non foi posíbel acadar a rede + + + Permission denied + Permiso negado + + + Connection timed out + A conexión esgotou o tempo-límite + + + Connection refused + Aconexión rexeitouse + + + The bound address is already in use + O enderezo vinculado xa está en uso + + + The address is not available + O enderezo non está dispoñíbel + + + The address is protected + O enderezo está protexido + + + Datagram was too large to send + O datagrama é grande de máis para envialo + + + Unable to send a message + Non foi posíbel enviar unha mensaxe + + + Unable to receive a message + Non foi posíbel recibir unha mensaxe + + + Unable to write + Non foi posíbel escribir + + + Network error + Erro de rede + + + Another socket is already listening on the same port + Xa hai outro socket a escoitar o mesmo porto + + + Operation on non-socket + Operación nun non socket + + + The proxy type is invalid for this operation + O tipo de proxy non é válido para esta operación + + + The address is invalid for this operation + O enderezo non é válido para esta operación + + + The specified network session is not opened + A sesión de rede que se especificou non está aberta + + + Unknown error + Erro descoñecido + + + QSystemSemaphore %1: permission denied @@ -6709,6 +7039,10 @@ Desexa sobrescribilo? %1: esgotou os recursos + %1: name error + %1: err o de nome + + %1: unknown error %2 %1: erro descoñecido %2 @@ -6739,7 +7073,7 @@ Desexa sobrescribilo? QTcpServer Operation on socket is not supported - A operación no socket non está soportada + Non se permite a operación no socket @@ -6799,11 +7133,29 @@ Desexa sobrescribilo? QUndoGroup Undo + Desfacer + + + Redo + Refacer + + + Undo %1 + Desfacer %1 + + + Undo + Default text for undo action Desfacer + Redo %1 + Refacer %1 + + Redo - Facer de novo + Default text for redo action + Refacer @@ -6817,11 +7169,29 @@ Desexa sobrescribilo? QUndoStack Undo + Desfacer + + + Redo + Refacer + + + Undo %1 + Desfacer %1 + + + Undo + Default text for undo action Desfacer + Redo %1 + Refacer %1 + + Redo - Facer de novo + Default text for redo action + Refacer @@ -6878,6 +7248,10 @@ Desexa sobrescribilo? Pedido cancelado + Request canceled + Pedido cancelado + + Request blocked Pedido bloqueado @@ -6897,6 +7271,10 @@ Desexa sobrescribilo? File does not exist O ficheiro non existe + + Loading is handled by the media engine + A carga xestiónaa o motor de medios + QWebPage @@ -6906,7 +7284,7 @@ Desexa sobrescribilo? Bad HTTP request - Pedido HTTP incorrecto + Pedido HTTP incorrecto %n file(s) @@ -6947,6 +7325,11 @@ Desexa sobrescribilo? Non escolleu ningún ficheiro + Details + text to display in <details> tag when it has no <summary> child + Detalles + + Open in New Window Open in New Window context menu item Abrir nunha xanela nova @@ -6977,6 +7360,61 @@ Desexa sobrescribilo? Copiar a imaxe + Copy Image Address + Copy Image Address menu item + Copiar o enderezo da imaxe + + + Open Video + Open Video in New Window + Abrir un vídeo + + + Open Audio + Open Audio in New Window + Abrir un son + + + Copy Video + Copy Video Link Location + Copiar o vídeo + + + Copy Audio + Copy Audio Link Location + Copiar o son + + + Toggle Controls + Toggle Media Controls + Conmutar os controis + + + Toggle Loop + Toggle Media Loop Playback + Conmutar o repetir + + + Enter Fullscreen + Switch Video to Fullscreen + Pór en pantalla completa + + + Play + Play + Reproducir + + + Pause + Pause + Pausar + + + Mute + Mute + Silenciar + + Open Frame Open Frame in New Window context menu item Abrir o marco @@ -7017,6 +7455,11 @@ Desexa sobrescribilo? Apegar + Select All + Select All context menu item + Escoller todo + + No Guesses Found No Guesses Found context menu item Non se atoparon conxecturas @@ -7079,7 +7522,7 @@ Desexa sobrescribilo? Check Grammar With Spelling Check grammar with spelling context menu item - Verificar a gramática mentres se escribe + Comprobar a gramática mentres se escribe Fonts @@ -7483,7 +7926,7 @@ Desexa sobrescribilo? Select all - Escoller todo + Escoller todo Select to the next character @@ -7644,7 +8087,7 @@ Desexa sobrescribilo? Commit - Entregar + Remitir Done @@ -7984,6 +8427,94 @@ Desexa sobrescribilo? + QmlJSDebugger::LiveSelectionTool + + Items + Elementos + + + + QmlJSDebugger::QmlToolBar + + Inspector Mode + Modo de inspección + + + Play/Pause Animations + Reproducir/Pausar as animacións + + + Select + Escoller + + + Select (Marquee) + Escoller (marcado) + + + Zoom + Ampliar + + + Color Picker + Selector de cores + + + Apply Changes to QML Viewer + Aplicar as modificación no Visor de QML + + + Apply Changes to Document + Aplicar as modificacións ao documento + + + Tools + Utensilios + + + 1x + 1x + + + 0.5x + 0,5x + + + 0.25x + 0,25x + + + 0.125x + 0,125x + + + 0.1x + 0,1x + + + + QmlJSDebugger::ToolBarColorBox + + Copy Color + Copiar a cor + + + + QmlJSDebugger::ZoomTool + + Zoom to &100% + Ampliar ao &100% + + + Zoom In + Ampliar + + + Zoom Out + Reducir + + + QtXmlPatterns %1 is an unsupported encoding. @@ -8266,7 +8797,7 @@ Desexa sobrescribilo? In the replacement string, %1 can only be used to escape itself or %2, not %3 - Na cadea substituta %1 só pode ser usado para escaparse a si mesmo ou a %2, non a %3. + Na cadea substituta %1 só pode usarse para escaparse a si mesmo ou a %2, non a %3 %1 matches newline characters @@ -8310,7 +8841,7 @@ Desexa sobrescribilo? The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - A forma de normalización %1 non está soportada. As formas soportadas son %2, %3, %4, %5 e ningunha, i.e. a cadea en branco (sen normalización). + Non se permite a forma de normalización %1. As formas permitidas son %2, %3, %4, %5 e ningunha, i.e. a cadea en branco (sen normalización). A zone offset must be in the range %1..%2 inclusive. %3 is out of range. @@ -8374,7 +8905,7 @@ Desexa sobrescribilo? Version %1 is not supported. The supported XQuery version is 1.0. - Non está soportada a versión %1. A versión soportada de XQuery é a 1.0. + Non se permite utilizar a versión %1. A versión admitida de XQuery é a 1.0. The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. @@ -8398,7 +8929,7 @@ Desexa sobrescribilo? The keyword %1 cannot occur with any other mode name. - A palabra-chave %1 só pode aparecer con calquera outro nome de modo. + A palabra clave %1 só pode aparecer con calquera outro nome de modo. The value of attribute %1 must be of type %2, which %3 isn't. @@ -8422,7 +8953,7 @@ Desexa sobrescribilo? The Schema Import feature is not supported, and therefore %1 declarations cannot occur. - A funcionalidade de Importación de Esquema non está soportada, polo tanto non pode haber declaracións %1. + Non se permite utilizar a funcionalidade de Importación de Esquema, polo tanto non pode haber declaracións %1. The target namespace of a %1 cannot be empty. @@ -8430,7 +8961,7 @@ Desexa sobrescribilo? The module import feature is not supported - A funcionalidade de importación de módulos non está soportada + Non se permite utilizar a funcionalidade de importación de módulos A variable with name %1 has already been declared. @@ -8446,7 +8977,11 @@ Desexa sobrescribilo? The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - O espazo de nomes das funcións definidas polo usuario non pode estar en branco (probe co prefixo predefinido %1, que está para casos como este) + O espazo de nomes das funcións definidas polo usuario non pode estar en branco (probe co prefixo predefinido %1, que está para casos como este) + + + The namespace for a user defined function cannot be empty (try the predefined prefix %1, which exists for cases like this) + O espazo de nomes das funcións definidas polo usuario non pode estar en branco (ténteo co prefixo predefinido %1, que está para casos coma este) The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. @@ -8462,7 +8997,7 @@ Desexa sobrescribilo? No external functions are supported. All supported functions can be used directly, without first declaring them as external - Non se soportan as funcións externas. Todas as funcións soportadas poden ser usadas directamente, non fai falla declaralas como externas + Non se permiten utilizar as funcións externas. Todas as funcións soportadas poden ser usadas directamente, non fai falla declaralas como externas An argument with name %1 has already been declared. Every argument name must be unique. @@ -8502,11 +9037,11 @@ Desexa sobrescribilo? The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. - Non está soportada a funcionalidade de Validación do Esquema. Polo tanto, as expresións %1 non poden ser usadas. + Non se permite utilizar a funcionalidade de Validación do Esquema. Polo tanto, as expresións %1 non poden ser usadas. None of the pragma expressions are supported. Therefore, a fallback expression must be present - Non está soportada ningunha das expresións pragma. Polo tanto, debe haber presente unha expresión de reserva + Non se permite utilizar ningunha das expresións pragma. Polo tanto, debe haber presente unha expresión de reserva Each name of a template parameter must be unique; %1 is duplicated. @@ -8574,7 +9109,7 @@ Desexa sobrescribilo? %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. - %1 non está nas declaracións de atributos ao alcance. Lembre que non está soportada a funcionalidade de importación de esquemas. + %1 non está nas declaracións de atributos ao alcance. Lembre que non está implementada a funcionalidade de importación de esquemas. The name of an extension expression must be in a namespace. @@ -8914,7 +9449,7 @@ Desexa sobrescribilo? Unknown notation %1 used in %2 facet. - Empregouse a notación non válida %1 na faceta %2. + Empregouse a notación descoñecida %1 na faceta %2. %1 facet contains invalid value %2: %3. @@ -9290,7 +9825,11 @@ Desexa sobrescribilo? Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type. - O modelo de contido do tipo complexo %1 contén un elemento %2 polo que non se pode derivar por extensión a partir dun tipo non baleiro. + O modelo de contido do tipo complexo %1 contén un elemento %2 polo que non se pode derivar por extensión a partir dun tipo non baleiro. + + + Content model of complex type %1 contains %2 element, so it cannot be derived by extension from a non-empty type. + O modelo do contido do tipo complexo %1 contén o elemento %2, polo que non se pode derivar por extensión a partir dun tipo non baleiro. Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model. @@ -9334,7 +9873,7 @@ Desexa sobrescribilo? %1 or %2 attribute of reference %3 does not match with the attribute declaration %4. - Nin atributo %1 nin o %2 da referencia %2 casan coa declaración do atributo %3. + Nin atributo %1 nin o %2 da referencia %3 casan coa declaración do atributo %4. Attribute group %1 has circular reference. @@ -9550,7 +10089,7 @@ Desexa sobrescribilo? Invalid QName content: %1. - Contido non válido do QName: %1 + Contido non válido do QName: %1. QName content is not listed in the enumeration facet. @@ -9562,7 +10101,7 @@ Desexa sobrescribilo? Notation content is not listed in the enumeration facet. - O contido da notación non está na faceta de enumeración + O contido da notación non está enumerado na faceta de enumeración. List content does not match length facet. @@ -9697,8 +10236,12 @@ Desexa sobrescribilo? O elemento %1 ten contido de texto non permitido. + Element %1 cannot contain other elements, as it has fixed content. + O elemento %1 non pode conter outros elementos porque ten contido fixo. + + Element %1 cannot contain other elements, as it has a fixed content. - O elemento %1 non pode conter outros elementos xa que ten un contido fixo. + O elemento %1 non pode conter outros elementos xa que ten un contido fixo. Element %1 is missing required attribute %2. diff --git a/translations/qt_help_gl.ts b/translations/qt_help_gl.ts index a3da29a..a64d7a4 100644 --- a/translations/qt_help_gl.ts +++ b/translations/qt_help_gl.ts @@ -26,6 +26,20 @@ aínda se está a indexar! + QHelpSearchResultWidget + + %1 - %2 of %n Hits + + %1 - %2 de %n coincidencia + + + + + 0 - 0 of 0 Hits + 0 - 0 de 0 coincidencias + + + QHelp Untitled @@ -303,18 +317,4 @@ aínda se está a indexar! con <B>polo menos unha</B> das palabras: - - QHelpSearchResultWidget - - %1 - %2 of %n Hits - - %1 - %2 de %n coincidencia - - - - - 0 - 0 of 0 Hits - 0 - 0 de 0 coincidencias - - -- cgit v0.12 From ba3f5ec3884aafb6c9761ef8719b82d4345245fa Mon Sep 17 00:00:00 2001 From: Satyam Bandarapu Date: Thu, 15 Dec 2011 11:15:15 +0200 Subject: Symbian: fix tst_QMenuBar::task256322_highlight() regression This fixes Symbian-only regression caused by ab0a2466d7e3998caad226197355b729f523764a. Reviewed-by: Miikka Heikkinen --- src/gui/widgets/qmenubar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 3e5365c..ec79237 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -1111,8 +1111,10 @@ void QMenuBar::setVisible(bool visible) #else #if defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60) if (isNativeMenuBar()) { +#ifndef Q_WS_S60 if (!visible) QWidget::setVisible(false); +#endif return; } #endif -- cgit v0.12 From 7cd99bae90a0ff6a0a6b12503d36cc48e09e024b Mon Sep 17 00:00:00 2001 From: Pavel Fric Date: Thu, 15 Dec 2011 13:50:40 +0100 Subject: Update czech translation --- translations/assistant_cs.ts | 217 +++++++++++++++++-- translations/designer_cs.ts | 159 +++++++++++--- translations/linguist_cs.ts | 6 +- translations/qt_cs.ts | 480 ++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 774 insertions(+), 88 deletions(-) diff --git a/translations/assistant_cs.ts b/translations/assistant_cs.ts index be54f86..fa923a5 100644 --- a/translations/assistant_cs.ts +++ b/translations/assistant_cs.ts @@ -273,6 +273,10 @@ Grund: Adresa + Toolbar Menu + Nabídka nástrojového pruhu + + Bookmarks Menu Nabídka se záložkami @@ -324,11 +328,11 @@ Grund: CentralWidget Add new page - Přidat novou stranu + Přidat novou stranu Close current page - Zavřít současnou stranu + Zavřít současnou stranu Print Document @@ -336,27 +340,27 @@ Grund: unknown - Neznámý + Neznámý Add New Page - Přidat novou stranu + Přidat novou stranu Close This Page - Zavřít tuto stranu + Zavřít tuto stranu Close Other Pages - Zavřít jiné strany + Zavřít jiné strany Add Bookmark for this Page... - Přidat záložku pro tuto stranu... + Přidat záložku pro tuto stranu... Search - Hledat + Hledat @@ -392,7 +396,35 @@ Grund: status message. -help Displays this help. - + Použití: assistant [volby] + +-collectionFile file Použije zadaný soubor se sbírkou + namísto výchozího souboru +-showUrl url Ukáže dokument s adresou + (URL). +-enableRemoteControl Povolí, aby byl Assistant + ovládán vzdáleně. +-show widget Ukáže zadaný panelový prvek, + což může být "obsah", "rejstřík", + "záložky" nebo "hledání". +-activate widget Zapne zadaný panelový prvek, + což může být "obsah", "rejstřík", + "záložky" nebo "hledání". +-hide widget Skryje zadaný panelový prvek, + což může být "obsah", "rejstřík", + "záložky" nebo "hledání". +-register helpFile Registers the specified help file + (.qch) in the given collection + file. +-unregister helpFile Odregistruje zadaný soubor s nápovědou + (.qch) ze souboru se sbírkou. +-setCurrentFilter filter Nastaví filtr jako aktivní filtr. +-remove-search-index Odstraní rejstřík hledání v celém textu. +-rebuild-search-index Přestaví rejstřík hledání v celém textu (může to být pomalé). +-quiet Nezobrazí žádnou chybu nebo + zprávu o stavu. +-help Zobrazí tuto nápovědu. + Unknown option: %1 @@ -672,6 +704,49 @@ Grund: + GlobalActions + + &Back + &Zpět + + + &Forward + &Dopředu + + + &Home + &Začáteční strana + + + ALT+Home + ALT+Home + + + Zoom &in + &Přiblížit + + + Zoom &out + &Oddálit + + + &Copy selected Text + &Kopírovat vybraný text + + + &Print... + &Tisk... + + + &Find in Text... + &Najít v textu... + + + &Find + &Najít + + + HelpEngineWrapper Unfiltered @@ -704,16 +779,28 @@ Grund: <title>Chyba 404 ...</title><div align="center"><br><br><h1>Stranu se nepodařilo najít.</h1><br><h3>'%1'</h3></div> + Open Link + Otevřít adresu odkazu + + Copy &Link Location &Kopírovat adresu odkazu + Copy + Kopírovat + + + Reload + Nahrát znovu + + Open Link in New Tab Ctrl+LMB Otevřít odkaz v nové kartě Ctrl+LMB Open Link in New Tab - Otevřít odkaz v nové kartě + Otevřít odkaz v nové kartě Unable to launch external application. @@ -721,6 +808,10 @@ Grund: Chyba při spouštění vnější aplikace. + + Open Link in New Page + Otevřít odkazu na nové straně + HelpWindow @@ -931,7 +1022,7 @@ Grund: &Print... - &Tisk... + &Tisk... New &Tab @@ -951,15 +1042,15 @@ Grund: &Copy selected Text - &Kopírovat vybraný text + &Kopírovat vybraný text &Find in Text... - &Najít v textu... + &Najít v textu... &Find - &Najít + &Najít Find &Next @@ -975,11 +1066,11 @@ Grund: Zoom &in - &Zvětšit + &Zvětšit Zoom &out - &Zmenšit + &Zmenšit Normal &Size @@ -1003,15 +1094,15 @@ Grund: &Home - &Začáteční strana + &Začáteční strana &Back - &Zpět + &Zpět &Forward - &Dopředu + &Dopředu Sync with Table of Contents @@ -1110,10 +1201,22 @@ Grund: Zvětšení + Open Pages + Otevřít strany + + + Bookmark Toolbar + Nástrojový pruh záložek + + &File &Soubor + E&xit + &Ukončit + + &Edit &Úpravy @@ -1122,12 +1225,16 @@ Grund: &Pohled + ALT+P + ALT+P + + &Go &Jít na ALT+Home - ALT+Home + ALT+Home &Bookmarks @@ -1147,6 +1254,17 @@ Grund: + OpenPagesWidget + + Close %1 + Zavřít %1 + + + Close All Except %1 + Zavřít vše kromě %1 + + + OutputPage Form @@ -1365,6 +1483,14 @@ Chcete jej odstranit? Blank Page Prázdná strana + + Appearance + Vzhled + + + Show tabs for each individual page + Ukázat karty pro každou jednotlivou stranu + QCollectionGenerator @@ -1412,7 +1538,18 @@ qcollectiongenerator <collection-config-file> [options] qcollectiongenerator. - + Použití: + +qcollectiongenerator <collection-config-file> [volby] + + -o <collection-file> Vytvoří soubor se sbírkou + nazvaný <collection-file>. Pokud + tato volba není stanovena + použije se výchozí název. + -v Zobrazí verzi + qcollectiongeneratoru. + + Could not open %1. @@ -1495,7 +1632,20 @@ qhelpgenerator <help-project-file> [options] qhelpgenerator. - + Použití: + +qhelpgenerator <help-project-file> [volby] + + -o <compressed-file> Vytvoří zabalenou nápovědu + nazvanou <compressed-file>. Pokud + tato volba není stanovena + použije se výchozí název. + -c Ověří, zda všechny odkazy v souborech HTML + ukazují na soubory v tomto projektu nápovědy. + -v Zobrazí verzi + qhelpgenerator. + + Could not open %1. @@ -1626,6 +1776,29 @@ Grund: + TabBar + + (Untitled) + (Bez názvu) + + + New &Tab + Nová &karta + + + &Close Tab + &Zavřít kartu + + + Close Other Tabs + Zavřít jiné karty + + + Add Bookmark for this Page... + Přidat záložku pro tuto stranu... + + + TopicChooser Choose a topic for <b>%1</b>: diff --git a/translations/designer_cs.ts b/translations/designer_cs.ts index 3db20bd..9201312 100644 --- a/translations/designer_cs.ts +++ b/translations/designer_cs.ts @@ -364,7 +364,7 @@ page - Strana + Strana Insert Page @@ -476,7 +476,7 @@ subwindow - Podokno + Podokno Subwindow @@ -520,6 +520,10 @@ Změnit rozvržení '%1' z %2 na %3 + Change layout alignment + Změnit zarovnání rozvržení + + Add '%1' to '%2' Command description for adding buttons to a QButtonGroup Přidat '%1' k '%2' @@ -541,9 +545,9 @@ Changed '%1' of %n objects Singular will never be shown - Změněna vlastnost '%1' jednoho předmětu - Změněna vlastnost '%1' %n předmětů - Změněna vlastnost '%1' %n předmětů + Změněna vlastnost '%1' jednoho objektu + Změněna vlastnost '%1' %n objektů + Změněna vlastnost '%1' %n objektů @@ -554,9 +558,9 @@ Reset '%1' of %n objects Singular will never be shown - Znovu nastavit '%1' jednoho předmětu - Znovu nastavit '%1' %n předmětů - Znovu nastavit '%1' %n předmětů + Znovu nastavit '%1' jednoho objektu + Znovu nastavit '%1' %n objektů + Znovu nastavit '%1' %n objektů @@ -567,9 +571,9 @@ Add dynamic property '%1' to %n objects Singular will never be shown - Přidat dynamickou vlastnost '%1' do jednoho předmětu - Přidat dynamickou vlastnost '%1' do %n předmětů - Přidat dynamickou vlastnost '%1' do %n předmětů + Přidat dynamickou vlastnost '%1' do jednoho objektu + Přidat dynamickou vlastnost '%1' do %n objektů + Přidat dynamickou vlastnost '%1' do %n objektů @@ -579,9 +583,9 @@ Remove dynamic property '%1' from %n objects - Odstranit dynamickou vlastnost '%1' z jednoho předmětu - Odstranit dynamickou vlastnost '%1' z %n předmětů - Odstranit dynamickou vlastnost '%1' z %n předmětů + Odstranit dynamickou vlastnost '%1' z jednoho objektu + Odstranit dynamickou vlastnost '%1' z %n objektů + Odstranit dynamickou vlastnost '%1' z %n objektů @@ -608,7 +612,7 @@ ConnectionDelegate <object> - <Předmět> + <objekt> <signal> @@ -1102,7 +1106,7 @@ Parsing grid layout minimum size values ObjectInspectorModel Object - Předmět + Objekt Class @@ -1121,11 +1125,11 @@ Parsing grid layout minimum size values ObjectNameDialog Change Object Name - Změnit název předmětu + Změnit název objektu Object Name - Název předmětu + Název objektu @@ -1208,7 +1212,7 @@ Parsing grid layout minimum size values Attempt to add child that is not of class QWizardPage to QWizard. - Pokus o přidání strany předmětu třídy QWizard, která není typu QWizardPage. + Pokus o přidání strany objektu třídy QWizard, která není typu QWizardPage. Attempt to add a layout to a widget '%1' (%2) which already has a layout of non-box type %3. @@ -1758,7 +1762,7 @@ Chcete to zkusit ještě jednou? The container extension of the widget '%1' (%2) returned a widget not managed by Designer '%3' (%4) when queried for page #%5. Container pages should only be added by specifying them in XML returned by the domXml() method of the custom widget. Kontejnerové rozšíření prvku '%1' (%2) vrátilo pro stranu %5 prvek '%3' (%4), který není spravován programem Designer. -Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu domXML() uživatelsky stanoveného prvku. +Kontejnerové stránky by měly být zadány výhradně v XML vrácené metodě domXML() uživatelsky stanoveného prvku. Unexpected element <%1> @@ -1799,7 +1803,7 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu Object Inspector - Ukazatel předmětů + Ukazatel objektů Resource Browser @@ -1838,7 +1842,7 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu Edit - Úpravy + Úpravy Toolbars @@ -1853,6 +1857,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu &Pohled + &Edit + &Úpravy + + &Settings &Nastavení @@ -1906,7 +1914,7 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu Empty class name passed to widget factory method ---------- Empty class name passed to widget factory method - Postupu %1 byl předán prázdný název třídy (název předmětu '%2'). + Postupu %1 byl předán prázdný název třídy (název objektu '%2'). QFormBuilder was unable to create a custom widget of the class '%1'; defaulting to base class '%2'. @@ -1914,7 +1922,7 @@ Empty class name passed to widget factory method QFormBuilder was unable to create a widget of the class '%1'. - QFormBuilderu se nepodařilo vytvořit předmět třídy '%1'. + QFormBuilderu se nepodařilo vytvořit objekt třídy '%1'. The layout type `%1' is not supported. @@ -3746,6 +3754,10 @@ Chcete tuto předlohu přepsat? Zděděno + [Theme] %1 + [Téma] %1 + + Horizontal Vodorovný @@ -3754,6 +3766,10 @@ Chcete tuto předlohu přepsat? Svislý + Theme + Téma + + Normal Off Obvyklé, vypnuto @@ -4346,6 +4362,17 @@ Chcete tuto předlohu přepsat? + qdesigner_internal::IconThemeDialog + + Set Icon From Theme + Nastavit ikonu z tématu + + + Input icon name from the current theme: + Název pro ikonu z nynějšího tématu: + + + qdesigner_internal::ItemListEditor Properties &<< @@ -4396,7 +4423,7 @@ Chcete tuto předlohu přepsat? qdesigner_internal::LabelTaskMenu Change rich text... - Změnit upravovatelný text... + Změnit bohatý text... Change plain text... @@ -4488,15 +4515,15 @@ Chcete tuto předlohu přepsat? Shortcut: - Klávesová zkratka: + Klávesová zkratka: Checkable: - Zaškrtnutelná: + Zaškrtnutelná: ToolTip: - Rada k nástroji: + Rada k nástroji: ... @@ -4508,7 +4535,23 @@ Chcete tuto předlohu přepsat? Object &name: - &Název předmětu: + &Název objektu: + + + T&oolTip: + &Nástrojová rada: + + + Icon th&eme: + &Téma ikon: + + + &Checkable: + &Zaškrtnutelné: + + + &Shortcut: + &Klávesová zkratka: @@ -4520,7 +4563,7 @@ Chcete tuto předlohu přepsat? The current object already has a property named '%1'. Please select another, unique one. - nynější předmět již má vlastnost s názvem '%1'. + Nynější objekt již má vlastnost s názvem '%1'. Zvolte, prosím, jiný, jedinečný název. @@ -4774,9 +4817,17 @@ Zvolte, prosím, jiný název. Vybrat soubor... + Set Icon From Theme... + Nastavit ikonu z tématu... + + ... ... + + [Theme] %1 + [Téma] %1 + qdesigner_internal::PlainTextEditorDialog @@ -5049,7 +5100,7 @@ která byla volně puštěná. Object: %1 Class: %2 - Předmět: %1 + Objekt: %1 Třída: %2 @@ -5130,7 +5181,7 @@ Třída: %2 qdesigner_internal::QDesignerTaskMenu Change objectName... - Změnit název předmětu... + Změnit název objektu... Change toolTip... @@ -5179,7 +5230,7 @@ Třída: %2 Set size constraint on %n widget(s) - Nastavit omezení velikosti u jednoho prvku + Nastavit omezení velikosti u %n prvku Nastavit omezení velikosti u %n prvků Nastavit omezení velikosti u %n prvků @@ -5189,6 +5240,42 @@ Třída: %2 Omezení velikosti + Layout Alignment + Zarovnání rozvržení + + + No Horizontal Alignment + Žádné vodorovné zarovnání + + + Left + Vlevo + + + Center Horizontally + Na střed vodorovně + + + Right + Vpravo + + + No Vertical Alignment + Žádné svislé zarovnání + + + Top + Nahoře + + + Center Vertically + Na střed svisle + + + Bottom + Dole + + Set Minimum Width Nastavit nejmenší šířku @@ -5331,7 +5418,7 @@ Třída: %2 Rich Text - Upravovatelný text + Bohatý text Source @@ -5396,6 +5483,10 @@ Třída: %2 Insert &Image Vložit &obrázek + + Simplify Rich Text + Zjednodušit bohatý text + qdesigner_internal::ScriptDialog diff --git a/translations/linguist_cs.ts b/translations/linguist_cs.ts index fb56289..e235125 100644 --- a/translations/linguist_cs.ts +++ b/translations/linguist_cs.ts @@ -1164,7 +1164,11 @@ Volby: Illegal escape squence - Neplatná úniková posloupnost + Neplatná úniková posloupnost + + + Illegal escape sequence + Illegal unicode escape sequence diff --git a/translations/qt_cs.ts b/translations/qt_cs.ts index 193dfa4..d8080eb 100644 --- a/translations/qt_cs.ts +++ b/translations/qt_cs.ts @@ -31,10 +31,25 @@ + Debugger::JSAgentWatchData + + [Array of length %1] + [Pole délky %1] + + + <undefined> + <nevymezeno> + + + FakeReply Fake error ! - Napodobená chyba! + Napodobená chyba! + + + Fake error! + Falešná chyba! Invalid URL @@ -508,6 +523,10 @@ Ověřte, prosím, instalaci Gstreamer a ujistěte se, Error opening source: media type could not be determined Zdroj se nepodařilo otevřít: nepodařilo se určit typ média + + Failed to set requested IAP + Nepodařilo se nastavit požadované IAP + Phonon::MMF::StereoWidening @@ -1126,6 +1145,14 @@ na QAccessibleButton + Uncheck + Zrušit označení křížkem + + + Check + Označit křížkem + + Press Stisknout @@ -1303,6 +1330,11 @@ na %1: Nejsou již použitelné zdroje + %1: permission denied + QSystemSemaphore + %1: Přístup odepřen + + %1: unknown error %2 QSystemSemaphore %1: Neznámá chyba %2 @@ -1454,6 +1486,13 @@ na + QDeclarativeApplication + + Application is an abstract class + Aplikace je abstraktní třída + + + QDeclarativeBehavior Cannot change the animation assigned to a Behavior. @@ -1566,21 +1605,29 @@ na Component objects cannot declare new properties. - Předměty součástek nemohou prohlásit nové vlastnosti. + Objekty součástek nemohou prohlásit nové vlastnosti. Component objects cannot declare new signals. - Předměty součástek nemohou prohlásit nové signály. + Objekty součástek nemohou prohlásit nové signály. Component objects cannot declare new functions. - Předměty součástek nemohou prohlásit nové funkce. + Objekty součástek nemohou prohlásit nové funkce. Cannot create empty component specification Nelze vytvořit prázdné vymezení součástky + "%1.%2" is not available in %3 %4.%5. + "%1.%2" není dostupný v %3 %4.%5. + + + "%1.%2" is not available due to component versioning. + "%1.%2" není dostupný kvůli verzování součástky. + + Incorrectly specified signal assignment Nesprávně vymezené přiřazení signálu @@ -1602,11 +1649,11 @@ na Non-existent attached object - Pro vlastnost neexistuje žádný připojený předmět + Pro vlastnost neexistuje žádný připojený objekt Invalid attached object assignment - Neplatné přiřazení připojeného předmětu + Neplatné přiřazení připojeného objektu Cannot assign to non-existent default property @@ -1654,11 +1701,11 @@ na Unexpected object assignment - Nepřípustné přiřazení předmětu + Nepřípustné přiřazení objektu Cannot assign object to list - Přiřazení předmětu k seznamům není přípustné + Přiřazení objektu k seznamům není přípustné Can only assign one binding to lists @@ -1682,7 +1729,7 @@ na Cannot assign object to property - Přiřazení předmětu k vlastnosti není přípustné + Přiřazení objektu k vlastnosti není přípustné "%1" cannot operate on "%2" @@ -1791,6 +1838,10 @@ na Invalid empty URL Neplátná prázdná adresa (URL) + + createObject: value is not an object + createObject: Hodnota není objektem + QDeclarativeConnections @@ -1800,7 +1851,7 @@ na Connections: nested objects not allowed - Spojení: vkládané předměty nejsou povoleny + Spojení: vkládané objekty nejsou povoleny Connections: syntax error @@ -1931,6 +1982,17 @@ na + QDeclarativeLayoutMirroringAttached + + LayoutDirection attached property only works with Items + Připojená vlastnost LayoutDirection pracuje jen s položkami + + + LayoutMirroring is only available via attached properties + LayoutMirroring je dostupné pouze prostřednictvím připojených vlastností + + + QDeclarativeListModel remove: index %1 out of range @@ -1938,7 +2000,7 @@ na insert: value is not an object - vložit (insert): Hodnota není předmětem + vložit (insert): Hodnota není objektem insert: index %1 out of range @@ -1950,11 +2012,11 @@ na append: value is not an object - připojit (append): Hodnota není předmětem + připojit (append): Hodnota není objektem set: value is not an object - nastavit (set): Hodnota není předmětem + nastavit (set): Hodnota není objektem set: index %1 out of range @@ -2030,6 +2092,10 @@ na Illegal escape squence + Neplatná úniková posloupnost + + + Illegal escape sequence Neplatná úniková posloupnost @@ -2158,7 +2224,7 @@ na QDeclarativePropertyChanges PropertyChanges does not support creating state-specific objects. - PropertyChanges nepodporuje vytváření předmětů, které jsou přiřazeny jednomu stavu. + PropertyChanges nepodporuje vytváření objektů, které jsou přiřazeny jednomu stavu. Cannot assign to non-existent property "%1" @@ -2203,7 +2269,7 @@ na QDeclarativeVME Unable to create object of type %1 - Nepodařilo se vytvořit žádný předmět typu %1 + Nepodařilo se vytvořit žádný objekt typu %1 Cannot assign value %1 to property %2 @@ -2211,7 +2277,7 @@ na Cannot assign object type %1 with no default method - Typ předmětu %1 nelze přiřadit, protože neexistuje žádná výchozí metoda + Typ objektu %1 nelze přiřadit, protože neexistuje žádná výchozí metoda Cannot connect mismatched signal/slot %1 %vs. %2 @@ -2219,19 +2285,19 @@ na Cannot assign an object to signal property %1 - Vlastnosti signálu %1 nelze přiřadit žádný předmět + Vlastnosti signálu %1 nelze přiřadit žádný objekt Cannot assign object to list - Přiřazení předmětu k seznamům není přípustné + Přiřazení objektu k seznamům není přípustné Cannot assign object to interface property - Vlastnosti rozhraní nelze přiřadit žádný předmět + Vlastnosti rozhraní nelze přiřadit žádný objekt Unable to create attached object - Nepodařilo se vytvořit žádný připojený předmět (typu 'attached') + Nepodařilo se vytvořit žádný připojený objekt (typu 'attached') Cannot set properties on %1 as it is null @@ -2496,6 +2562,10 @@ na %1 se nepodařilo otevřít pro čtení + No file engine available or engine does not support UnMapExtension + Není dostupný žádný souborový stroj nebo stroj nepodporuje UnMapExtension + + Destination file exists Cílový soubor již existuje @@ -3480,6 +3550,18 @@ Ověřte, prosím, že byl zadán správný název souboru. Could not mmap '%1': %2 Operace mmap se nezdařila u '%1': %2 + + '%1' is not an ELF object (%2) + '%1' není objekt ELF (%2) + + + '%1' is not an ELF object + '%1' není objekt ELF + + + '%1' is an invalid ELF object (%2) + '%1' je neplatný objekt ELF (%2) + QLineEdit @@ -3577,6 +3659,10 @@ Ověřte, prosím, že byl zadán správný název souboru. %1: Remote closed %1: Spojení bylo protější stranou uzavřeno + + %1: Access denied + Přístup odepřen + QMYSQLDriver @@ -3751,6 +3837,10 @@ Ověřte, prosím, že byl zadán správný název souboru. Actions Činnosti + + Corner Toolbar + Rohový nástrojový pruh + QMessageBox @@ -3869,7 +3959,7 @@ Ověřte, prosím, že byl zadán správný název souboru. Another socket is already listening on the same port - Na tomto portu již naslouchá jiná zásuvka (socket) + Na této přípojce (bráně, portu) již naslouchá jiná zásuvka (socket) Unable to send a message @@ -3935,7 +4025,7 @@ Ověřte, prosím, že byl zadán správný název souboru. QNetworkAccessDataBackend Operation not supported on %1 - Tato operace není %1 podporována + Tato operace není %1 podporována Invalid URI: %1 @@ -4032,6 +4122,10 @@ Ověřte, prosím, že byl zadán správný název souboru. Chyba při spojení přes síť. + backend start error. + Chyba spuštění jádra. + + Temporary network failure. Síť dočasně vypadla. @@ -4276,6 +4370,10 @@ Ověřte, prosím, že byl zadán správný název souboru. invalid query: "%1" Neplátný dotaz: "%1" + + Host not found + Nepodařilo se najít počítač + QPPDOptionsModel @@ -5545,6 +5643,10 @@ Zvolte, prosím, pro soubor jiný název. %1: Bylo dosaženo systémem podmíněné meze velikosti + %1: bad name + %1: Špatný název + + %1: unix key file doesn't exists %1: Soubor s unixovým klíčem neexistuje @@ -5558,7 +5660,7 @@ Zvolte, prosím, pro soubor jiný název. %1: key error - %1: Chybný klíč + %1: Chybný klíč %1: create size is less then 0 @@ -6804,6 +6906,10 @@ Zvolte, prosím, pro soubor jiný název. Název hostitelského počítače neodpovídá žádnému z hostitelů platných pro toto osvědčení, kteří jsou na seznamu + The peer certificate is blacklisted + Osvědčení protějšího místa je na černé listině + + Unknown error Neznámá chyba @@ -6828,6 +6934,121 @@ Zvolte, prosím, pro soubor jiný název. + QSymbianSocketEngine + + Unable to initialize non-blocking socket + Neblokující zásuvku (socket) se nepodařilo spustit + + + Unable to initialize broadcast socket + Zásuvku pro vysílání (socket) se nepodařilo spustit + + + Attempt to use IPv6 socket on a platform with no IPv6 support + Vyzkoušelo se použít IPv6 zásuvku (socket) na systému bez podpory IPv6 + + + The remote host closed the connection + Vzdálený počítač uzavřel spojení + + + Network operation timed out + Časový limit pro síťovou operaci byl překročen + + + Out of resources + Nejsou dostupné žádné zdroje + + + Unsupported socket operation + Nepodporovaná zásuvková operace (povel pro socket) + + + Protocol type not supported + Protokol tohoto typu není podporován + + + Invalid socket descriptor + Neplatný deskriptor zásuvky (socketu) + + + Host unreachable + Cílový počítač je nedosažitelný + + + Network unreachable + Síť není dosažitelná + + + Permission denied + Přístup odepřen + + + Connection timed out + Časový limit pro spojení byl překročen + + + Connection refused + Spojení bylo odmítnuto + + + The bound address is already in use + Uvedená adresa se už používá + + + The address is not available + Adresa není dostupná + + + The address is protected + Adresa je chráněna + + + Datagram was too large to send + Datagram byl pro odeslání příliš veliký + + + Unable to send a message + Nepodařilo se odeslat zprávu + + + Unable to receive a message + Zprávu se nepodařilo přijmout + + + Unable to write + Nepodařilo se zapsat + + + Network error + Síťová chyba + + + Another socket is already listening on the same port + Na této přípojce (bráně, portu) již naslouchá jiná zásuvka (socket) + + + Operation on non-socket + Operaci lze použít pouze na ne-zásuvce (socketu) + + + The proxy type is invalid for this operation + Tuto operaci nelze s tímto typem proxy provést + + + The address is invalid for this operation + Adresa pro tuto operaci není platná + + + The specified network session is not opened + Zadané síťové sezení není otevřeno + + + Unknown error + Neznámá chyba + + + QSystemSemaphore %1: does not exist @@ -6838,6 +7059,10 @@ Zvolte, prosím, pro soubor jiný název. %1: Již existuje + %1: name error + %1: Chybný název + + %1: unknown error %2 %1: Neznámá chyba %2 @@ -6936,12 +7161,30 @@ Zvolte, prosím, pro soubor jiný název. QUndoGroup Redo - Znovu + Znovu + + + Undo + Zpět + + + Undo %1 + Zpět %1 Undo + Default text for undo action Zpět + + Redo %1 + Znovu %1 + + + Redo + Default text for redo action + Znovu + QUndoModel @@ -6954,12 +7197,30 @@ Zvolte, prosím, pro soubor jiný název. QUndoStack Redo - Znovu + Znovu Undo + Zpět + + + Undo %1 + Zpět %1 + + + Undo + Default text for undo action Zpět + + Redo %1 + Znovu %1 + + + Redo + Default text for redo action + Znovu + QUnicodeControlCharacterMenu @@ -7027,6 +7288,10 @@ Zvolte, prosím, pro soubor jiný název. Nahrání rámce bylo přerušeno změnou směrnice + Loading is handled by the media engine + O nahrávání se stará multimediální stroj + + Frame load interruped by policy change Nahrání rámce bylo přerušeno změnou směrnice @@ -7123,7 +7388,7 @@ Zvolte, prosím, pro soubor jiný název. Select all - Vybrat vše + Vybrat vše Select to the start of the line @@ -7319,6 +7584,11 @@ Zvolte, prosím, pro soubor jiný název. Nebyl vybrán žádný soubor + Details + text to display in <details> tag when it has no <summary> child + Podrobnosti + + Open in New Window Open in New Window context menu item Otevřít v novém okně @@ -7336,17 +7606,72 @@ Zvolte, prosím, pro soubor jiný název. Open Image Open Image in New Window context menu item - Vyobrazení otevřít v novém okně + Obrázek otevřít v novém okně Save Image Download Image context menu item - Uložit vyobrazení + Uložit obrázek Copy Image Copy Link context menu item - Kopírovat vyobrazení + Kopírovat obrázek + + + Copy Image Address + Copy Image Address menu item + Kopírovat adresu obrázku + + + Open Video + Open Video in New Window + Otevřít video + + + Open Audio + Open Audio in New Window + Otevřít zvuk + + + Copy Video + Copy Video Link Location + Kopírovat video + + + Copy Audio + Copy Audio Link Location + Kopírovat umístění odkazu na zvuk + + + Toggle Controls + Toggle Media Controls + Přepnout ovládání + + + Toggle Loop + Toggle Media Loop Playback + Přepnout smyčku + + + Enter Fullscreen + Switch Video to Fullscreen + Vejít do režimu na celou obrazovku + + + Play + Play + Přehrát + + + Pause + Pause + Pozastavit + + + Mute + Mute + Ztlumit Open Frame @@ -7389,6 +7714,11 @@ Zvolte, prosím, pro soubor jiný název. Vložit + Select All + Select All context menu item + Vybrat vše + + No Guesses Found No Guesses Found context menu item Nebyly nalezeny žádné návrhy @@ -7866,7 +8196,7 @@ Zvolte, prosím, pro soubor jiný název. Bad HTTP request - Neplatný požadavek HTTP + Neplatný požadavek HTTP Unknown @@ -8328,6 +8658,94 @@ Zvolte, prosím, pro soubor jiný název. + QmlJSDebugger::LiveSelectionTool + + Items + Položky + + + + QmlJSDebugger::QmlToolBar + + Inspector Mode + Režim inspektora + + + Play/Pause Animations + Přehrát/Pozastavit animace + + + Select + Vybrat + + + Select (Marquee) + Vybrat (Marquee) + + + Zoom + Přiblížit/Oddálit + + + Color Picker + Volič barvy + + + Apply Changes to QML Viewer + Použít změny na prohlížeč QML + + + Apply Changes to Document + Použít změny na dokument + + + Tools + Nástroje + + + 1x + 1x + + + 0.5x + 0.5x + + + 0.25x + 0.25x + + + 0.125x + 0.125x + + + 0.1x + 0.1x + + + + QmlJSDebugger::ToolBarColorBox + + Copy Color + Kopírovat barvu + + + + QmlJSDebugger::ZoomTool + + Zoom to &100% + Zvětšit na &100% + + + Zoom In + Přiblížit + + + Zoom Out + Oddálit + + + QtXmlPatterns A comment cannot contain %1 @@ -9363,7 +9781,7 @@ Zvolte, prosím, pro soubor jiný název. Derivation method of %1 must be extension because the base type %2 is a simple type. - Rozšíření s musí používat jako způsob dědičnosti (odvození) pro %1, neboť základní typ %2 je jednoduchým typem. + Rozšíření musí používat jako způsob dědičnosti (odvození) pro %1, neboť základní typ %2 je jednoduchým typem. Complex type %1 has duplicated element %2 in its content model. -- cgit v0.12 From 3a4728e169ef59896f8f1c7f1c9a3abc814c83cf Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 15 Dec 2011 13:29:30 +0000 Subject: Symbian - Fix QFile::map with non page aligned offsets Although it is not documented, RFileMap native API requires the offset into the file to be a multiple of the page size. Round down the offset requested by the user to the page size. Add back the difference before returning the base address to the user. e.g. if the offset passed to QFile::map was 5000: The offset passed to RFileMap will be 4096 The address returned to the user will be the RFileMap::Base() + 904 The modified address is used to key the hash of file mappings, so that QFile::unmap() can be passed the modified address without needing changes. Reviewed-by: mread Task-number: ou1cimx#953054 --- src/corelib/io/qfsfileengine_unix.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 4961722..781a5f0 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -1058,22 +1058,24 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla TInt nativeMapError = KErrNone; RFileMap mapping; TUint mode(EFileMapRemovableMedia); + TUint64 nativeOffset = offset & ~(mapping.PageSizeInBytes() - 1); + //If the file was opened for write or read/write, then open the map for read/write if (openMode & QIODevice::WriteOnly) mode |= EFileMapWrite; if (symbianFile.SubSessionHandle()) { - nativeMapError = mapping.Open(symbianFile, offset, size, mode); + nativeMapError = mapping.Open(symbianFile, nativeOffset, size, mode); } else { //map file by name if we don't have a native handle QString fn = QFileSystemEngine::absoluteName(fileEntry).nativeFilePath(); TUint filemode = EFileShareReadersOrWriters | EFileRead; if (openMode & QIODevice::WriteOnly) filemode |= EFileWrite; - nativeMapError = mapping.Open(qt_s60GetRFs(), qt_QString2TPtrC(fn), filemode, offset, size, mode); + nativeMapError = mapping.Open(qt_s60GetRFs(), qt_QString2TPtrC(fn), filemode, nativeOffset, size, mode); } if (nativeMapError == KErrNone) { QScopedResource ptr(mapping); //will call Close if adding to mapping throws an exception - uchar *address = mapping.Base(); + uchar *address = mapping.Base() + (offset - nativeOffset); maps[address] = mapping; ptr.take(); return address; -- cgit v0.12 From 69df8bf72da01f194bac66e80417b6483d00decb Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 16 Dec 2011 11:08:46 +0200 Subject: Fix to incorrect ApplicationActivate event in QtOpenGL QEvent::ApplicationActivate is sent incorrectly when application goes to background if OpenGL graphics system is used. The problem is that hidden global shared QGLWidget used by QtOpenGL for root context is added to CONE stack. Qt destroys shared GL widget when application goes to background and underlying CCoeControl is removed from CONE stack which causes CONE to handle stack changes. CONE tries to focus next control in stack which causes incorrect focus events in Qt leading to ApplicationActivate event. GL global share widget must not be added to CONE stack because it's hidden utility widget and don't belong to UI widget stack. Task-number: QTBUG-23195 Task-number: ou1cimx1#946477 Reviewed-by: Murray Read --- src/gui/kernel/qapplication_s60.cpp | 49 +++++++++++++++++++++++-------------- src/gui/kernel/qwidget_p.h | 1 + src/gui/kernel/qwidget_s60.cpp | 18 ++++++++------ src/opengl/qgl_p.h | 8 ++++++ src/opengl/qwindowsurface_gl.cpp | 25 ++++++++++++++----- src/opengl/qwindowsurface_gl_p.h | 1 + 6 files changed, 69 insertions(+), 33 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 587c0f2..48767b8 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -552,11 +552,13 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) // the control's window qwidget->d_func()->createExtra(); - SetFocusing(true); - m_longTapDetector = QLongTapTimer::NewL(this); - m_doubleClickTimer.invalidate(); - - DrawableWindow()->SetPointerGrab(ETrue); + if (!qwidget->d_func()->isGLGlobalShareWidget) { + SetFocusing(true); + m_longTapDetector = QLongTapTimer::NewL(this); + m_doubleClickTimer.invalidate(); + + DrawableWindow()->SetPointerGrab(ETrue); + } } #ifdef Q_SYMBIAN_TRANSITION_EFFECTS @@ -590,25 +592,27 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) QSymbianControl::~QSymbianControl() { - // Ensure backing store is deleted before the top-level - // window is destroyed - QT_TRY { - qt_widget_private(qwidget)->topData()->backingStore.destroy(); - } QT_CATCH(const std::exception&) { - // ignore exceptions, nothing can be done - } - - if (S60->curWin == this) - S60->curWin = 0; - if (!QApplicationPrivate::is_app_closing) { + if (!qwidget->d_func()->isGLGlobalShareWidget) { // GLGlobalShareWidget doesn't interact with scene + // Ensure backing store is deleted before the top-level + // window is destroyed QT_TRY { - setFocusSafely(false); + qt_widget_private(qwidget)->topData()->backingStore.destroy(); } QT_CATCH(const std::exception&) { // ignore exceptions, nothing can be done } + + if (S60->curWin == this) + S60->curWin = 0; + if (!QApplicationPrivate::is_app_closing) { + QT_TRY { + setFocusSafely(false); + } QT_CATCH(const std::exception&) { + // ignore exceptions, nothing can be done + } + } + S60->appUi()->RemoveFromStack(this); + delete m_longTapDetector; } - S60->appUi()->RemoveFromStack(this); - delete m_longTapDetector; } void QSymbianControl::setWidget(QWidget *w) @@ -1535,6 +1539,10 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) if (m_ignoreFocusChanged || (qwidget->windowType() & Qt::WindowType_Mask) == Qt::Desktop) return; + // just in case + if (qwidget->d_func()->isGLGlobalShareWidget) + return; + #ifdef Q_WS_S60 if (S60->splitViewLastWidget) return; @@ -1723,6 +1731,9 @@ TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) void QSymbianControl::setFocusSafely(bool focus) { + if (qwidget->d_func()->isGLGlobalShareWidget) + return; + // The stack hack in here is very unfortunate, but it is the only way to ensure proper // focus in Symbian. If this is not executed, the control which happens to be on // the top of the stack may randomly be assigned focus by Symbian, for example diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 9ac9479..94c1d63 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -916,6 +916,7 @@ public: void reparentChildren(); void registerTouchWindow(); QList widCleanupList; + uint isGLGlobalShareWidget : 1; #endif }; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index a37c265..fefa781 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -393,16 +393,18 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de stackingFlags = ECoeStackFlagStandard; } control->MakeVisible(false); - QT_TRAP_THROWING(control->ControlEnv()->AppUi()->AddToStackL(control.data(), ECoeStackPriorityDefault, stackingFlags)); - // Avoid keyboard focus to a hidden window. - control->setFocusSafely(false); - RDrawableWindow *const drawableWindow = control->DrawableWindow(); - // Request mouse move events. - drawableWindow->PointerFilter(EPointerFilterEnterExit - | EPointerFilterMove | EPointerFilterDrag, 0); - drawableWindow->EnableVisibilityChangeEvents(); + if (!isGLGlobalShareWidget) { + QT_TRAP_THROWING(control->ControlEnv()->AppUi()->AddToStackL(control.data(), ECoeStackPriorityDefault, stackingFlags)); + // Avoid keyboard focus to a hidden window. + control->setFocusSafely(false); + RDrawableWindow *const drawableWindow = control->DrawableWindow(); + // Request mouse move events. + drawableWindow->PointerFilter(EPointerFilterEnterExit + | EPointerFilterMove | EPointerFilterDrag, 0); + drawableWindow->EnableVisibilityChangeEvents(); + } } q->setAttribute(Qt::WA_WState_Created); diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index df09dfd..89153d9 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -106,6 +106,10 @@ class QMacWindowChangeEvent; class QWSGLWindowSurface; #endif +#ifdef Q_OS_SYMBIAN +extern bool qt_initializing_gl_share_widget(); +#endif + #ifndef QT_NO_EGL class QEglContext; #endif @@ -183,6 +187,10 @@ public: #endif { isGLWidget = 1; +#if defined(Q_OS_SYMBIAN) + if (qt_initializing_gl_share_widget()) + isGLGlobalShareWidget = 1; +#endif } ~QGLWidgetPrivate() {} diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index a15084b..d512946 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -184,28 +184,29 @@ QGLGraphicsSystem::QGLGraphicsSystem(bool useX11GL) class QGLGlobalShareWidget { public: - QGLGlobalShareWidget() : widget(0), initializing(false) { + QGLGlobalShareWidget() : widget(0), init(false) { created = true; } QGLWidget *shareWidget() { - if (!initializing && !widget && !cleanedUp) { - initializing = true; + if (!init && !widget && !cleanedUp) { + init = true; widget = new QGLWidget(QGLFormat(QGL::SingleBuffer | QGL::NoDepthBuffer | QGL::NoStencilBuffer)); #ifdef Q_OS_SYMBIAN if (!widget->context()->isValid()) { delete widget; widget = 0; - initializing = false; + init = false; return 0; } #endif + widget->resize(1, 1); // We don't need this internal widget to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) QWidgetPrivate::allWidgets->remove(widget); - initializing = false; + init = false; } return widget; } @@ -232,12 +233,17 @@ public: cleanedUp = false; } + bool initializing() + { + return init; + } + static bool cleanedUp; static bool created; private: QGLWidget *widget; - bool initializing; + bool init; }; bool QGLGlobalShareWidget::cleanedUp = false; @@ -268,6 +274,13 @@ void qt_destroy_gl_share_widget() _qt_gl_share_widget()->destroy(); } +bool qt_initializing_gl_share_widget() +{ + if (QGLGlobalShareWidget::created) + return _qt_gl_share_widget()->initializing(); + return false; +} + const QGLContext *qt_gl_share_context() { QGLWidget *widget = qt_gl_share_widget(); diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h index 91d1f9e..6c8b71f 100644 --- a/src/opengl/qwindowsurface_gl_p.h +++ b/src/opengl/qwindowsurface_gl_p.h @@ -68,6 +68,7 @@ struct QGLWindowSurfacePrivate; Q_OPENGL_EXPORT QGLWidget* qt_gl_share_widget(); Q_OPENGL_EXPORT void qt_destroy_gl_share_widget(); +bool qt_initializing_gl_share_widget(); class QGLWindowSurfaceGLPaintDevice : public QGLPaintDevice { -- cgit v0.12 From 9851e6da855357d6c1c17e956ba628aa975f92ce Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Fri, 16 Dec 2011 14:21:49 +0100 Subject: Fix crash in positionInLigature Check boundary of pos before accessing attributes. Task-number: QTBUG-23104 Reviewed-by: Eskil --- src/gui/text/qtextengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 2fc1dbd..71cb0e7 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2912,7 +2912,7 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end, closestItem--; int pos = si->position + clusterStart + closestItem; // Jump to the next charStop - while (!attrs[pos].charStop && pos < end) + while (pos < end && !attrs[pos].charStop) pos++; return pos; } -- cgit v0.12 From e20ac7155020ca7f8f7a2286fd9022f66aaca220 Mon Sep 17 00:00:00 2001 From: Pavel Fric Date: Fri, 16 Dec 2011 11:06:41 +0100 Subject: Fixes to czech translation --- translations/qt_cs.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translations/qt_cs.ts b/translations/qt_cs.ts index d8080eb..41eb55c 100644 --- a/translations/qt_cs.ts +++ b/translations/qt_cs.ts @@ -2894,7 +2894,7 @@ Ověřte, prosím, že byl zadán správný název souboru. Light - Lehké + Jemné Ogham @@ -2950,7 +2950,7 @@ Ověřte, prosím, že byl zadán správný název souboru. Italic - Itala + Kurzíva Korean @@ -2958,11 +2958,11 @@ Ověřte, prosím, že byl zadán správný název souboru. Normal - Obvyklé + Normální Oblique - Nakloněné + Skloněné Telugu -- cgit v0.12 From dae052cb11c0018121f2c4028aed9db17769fd77 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 19 Dec 2011 13:36:56 +0200 Subject: Fix m_longTapDetector causing crash. GL shared widget calls null poiter m_longTapDetector. These call shouldn't happen because GL shared widget isn't part of UI stack anymore. This patch adds null pointer checks Task-number: QTBUG-23252 Reviewed-by: TRUSTME --- src/gui/kernel/qapplication_s60.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 48767b8..1518d2d 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -556,7 +556,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) SetFocusing(true); m_longTapDetector = QLongTapTimer::NewL(this); m_doubleClickTimer.invalidate(); - + DrawableWindow()->SetPointerGrab(ETrue); } } @@ -600,7 +600,7 @@ QSymbianControl::~QSymbianControl() } QT_CATCH(const std::exception&) { // ignore exceptions, nothing can be done } - + if (S60->curWin == this) S60->curWin = 0; if (!QApplicationPrivate::is_app_closing) { @@ -830,7 +830,8 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) const TPointerEvent *pointerEvent = eventData.Pointer(i); const TAdvancedPointerEvent *advEvent = pointerEvent->AdvancedPointerEvent(); if (!advEvent || advEvent->PointerNumber() == 0) { - m_longTapDetector->PointerEventL(*pointerEvent); + if (m_longTapDetector) + m_longTapDetector->PointerEventL(*pointerEvent); QT_TRYCATCH_LEAVING(HandlePointerEvent(*pointerEvent)); } } @@ -847,8 +848,8 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) } } #endif - - m_longTapDetector->PointerEventL(pEvent); + if (m_longTapDetector) + m_longTapDetector->PointerEventL(pEvent); QT_TRYCATCH_LEAVING(HandlePointerEvent(pEvent)); } @@ -1718,7 +1719,8 @@ void QSymbianControl::HandleResourceChange(int resourceType) } void QSymbianControl::CancelLongTapTimer() { - m_longTapDetector->Cancel(); + if (m_longTapDetector) + m_longTapDetector->Cancel(); } TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) -- cgit v0.12 From 4db91cbd6147e40f543342f22c05b7baddc52e5a Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 19 Dec 2011 11:46:45 +0100 Subject: SSL: fix build with -openssl-linked for OpenSSL 0.9.8* OpenSSL's SSL_ctrl() always took a "void *" argument as 4th parameter, since at least version 0.9.7. I have no idea why we had "const void *" in there. Reviewed-by: Richard J. Moore Task-number: QTBUG-23132 --- src/network/ssl/qsslsocket_openssl.cpp | 4 ---- src/network/ssl/qsslsocket_openssl_symbols.cpp | 4 ---- src/network/ssl/qsslsocket_openssl_symbols_p.h | 4 ---- 3 files changed, 12 deletions(-) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 5f520f7..1eb352c 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -447,11 +447,7 @@ init_context: if (!ace.isEmpty() && !QHostAddress().setAddress(tlsHostName) && !(configuration.sslOptions & QSsl::SslOptionDisableServerNameIndication)) { -#if OPENSSL_VERSION_NUMBER >= 0x10000000L if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.data())) -#else - if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.constData())) -#endif qWarning("could not set SSL_CTRL_SET_TLSEXT_HOSTNAME, Server Name Indication disabled"); } } diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 90a840f..b5e16f0 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -210,11 +210,7 @@ DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return) DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG) DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return) #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) -#if OPENSSL_VERSION_NUMBER >= 0x10000000L DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return) -#else -DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, const void *parg, parg, return -1, return) -#endif #endif DEFINEFUNC3(int, SSL_read, SSL *a, a, void *b, b, int c, c, return -1, return) DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG) diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index 0381c4f..29934d1 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -318,11 +318,7 @@ int q_SSL_library_init(); void q_SSL_load_error_strings(); SSL *q_SSL_new(SSL_CTX *a); #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) -#if OPENSSL_VERSION_NUMBER >= 0x10000000L long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); -#else -long q_SSL_ctrl(SSL *ssl,int cmd, long larg, const void *parg); -#endif #endif int q_SSL_read(SSL *a, void *b, int c); void q_SSL_set_bio(SSL *a, BIO *b, BIO *c); -- cgit v0.12 From cb416ae734f39464d4481adbc56f57ba06ecadb7 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Mon, 19 Dec 2011 15:50:06 +0100 Subject: Fix a bug where 'int' is not printed in snippets. Reviewed-By: Trust Me --- tools/qdoc3/ditaxmlgenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index e3e32a0..06f7e8b 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3492,7 +3492,8 @@ void DitaXmlGenerator::writeText(const QString& markedCode, addLink(link, arg); } else { - link = arg.toString(); + //Encountered in snippets for example. Where the text should not be a link. + writeCharacters(arg.toString()); } } else { -- cgit v0.12 From 914679fcdfa1400dd68c98a247378860b8bcb1bb Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 19 Dec 2011 20:10:26 +0200 Subject: Fix missing part from commit dae052cb11c0018121f2c4028aed9db17769fd77 Forgot to amend commit before pushing, sorry. Task-number: QTBUG-23252 Reviewed-by: TRUSTME --- src/gui/kernel/qwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 7055c6b..bceda66 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -314,6 +314,7 @@ QWidgetPrivate::QWidgetPrivate(int version) #elif defined(Q_OS_SYMBIAN) , symbianScreenNumber(0) , fixNativeOrientationCalled(false) + , isGLGlobalShareWidget(0) #endif { if (!qApp) { -- cgit v0.12 From e8523386a8f977ac8b0e57423d8c949bca6ee5b8 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Tue, 20 Dec 2011 13:04:25 +0100 Subject: Add dita_docs target to generate DITA output. --- doc/doc.pri | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/doc.pri b/doc/doc.pri index c51a621..ea2fb2e 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -36,6 +36,7 @@ $$unixstyle { DEMOSMANIFESTTARGET = $$replace(DEMOSMANIFESTTARGET, "/", "\\") } ADP_DOCS_QDOCCONF_FILE = qt-build-docs-online.qdocconf +DITA_DOCS_QDOCCONF_FILE = qt-ditaxml.qdocconf QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \ (cd $$QT_BUILD_TREE && \ @@ -69,6 +70,8 @@ win32-g++*:isEmpty(QMAKE_SH) { # Build rules: adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE && $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$COPYWEBKITTARGB) adp_docs.depends += sub-qdoc3 # qdoc3 +dita_docs.commands = ($$QDOC $$DITA_DOCS_QDOCCONF_FILE) +dita_docs.depends += sub-qdoc3 # qdoc3 qch_docs.commands = $$QT_DOCUMENTATION qch_docs.depends += sub-qdoc3 @@ -103,5 +106,5 @@ docimages.path = $$[QT_INSTALL_DOCS]/src sub-qdoc3.depends = sub-corelib sub-xml sub-qdoc3.commands += (cd tools/qdoc3 && $(MAKE)) -QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN docs_ja_JP +QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs dita_docs qch_docs docs docs_zh_CN docs_ja_JP INSTALLS += htmldocs qchdocs docimages examplesmanifest demosmanifest -- cgit v0.12