From 26792835b56261b0a0080ea010205a0b3134830c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 10 Jun 2009 16:34:49 +0200 Subject: Fixed a compile failure on Solaris, really :) You can't static_cast from a signed to an unsigned type and vice versa. Reviewed-by: Kim --- demos/boxes/glshaders.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/demos/boxes/glshaders.cpp b/demos/boxes/glshaders.cpp index 05bbf71..094fd77 100644 --- a/demos/boxes/glshaders.cpp +++ b/demos/boxes/glshaders.cpp @@ -58,7 +58,7 @@ GLShader::GLShader(const char *data, int size, GLenum shaderType) m_shader = glCreateShaderObjectARB(shaderType); GLint glSize = size; - glShaderSourceARB(m_shader, 1, static_cast(&data), &glSize); + glShaderSourceARB(m_shader, 1, reinterpret_cast(&data), &glSize); glCompileShaderARB(m_shader); int status; glGetObjectParameterivARB(m_shader, GL_OBJECT_COMPILE_STATUS_ARB, &status); @@ -79,7 +79,7 @@ GLShader::GLShader(const QString& fileName, GLenum shaderType) GLint size = file.size(); const char *p = bytes.data(); file.close(); - glShaderSourceARB(m_shader, 1, static_cast(&p), &size); + glShaderSourceARB(m_shader, 1, reinterpret_cast(&p), &size); glCompileShaderARB(m_shader); int status; glGetObjectParameterivARB(m_shader, GL_OBJECT_COMPILE_STATUS_ARB, &status); @@ -105,7 +105,7 @@ QString GLShader::log() glGetObjectParameterivARB(m_shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); char *log = new char[length + 1]; GLsizei glLength = length; - glGetInfoLogARB(m_shader, glLength, &glLength, static_cast(log)); + glGetInfoLogARB(m_shader, glLength, &glLength, reinterpret_cast(log)); log[glLength] = '\0'; QString result(log); delete log; @@ -184,7 +184,7 @@ QString GLProgram::log() glGetObjectParameterivARB(m_program, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); char *log = new char[length + 1]; GLsizei glLength = length; - glGetInfoLogARB(m_program, glLength, &glLength, static_cast(log)); + glGetInfoLogARB(m_program, glLength, &glLength, reinterpret_cast(log)); log[glLength] = '\0'; QString result(log); delete log; @@ -212,7 +212,7 @@ bool GLProgram::hasParameter(const QString& name) if (!failed()) { QByteArray asciiName = name.toAscii(); - return -1 != glGetUniformLocationARB(m_program, static_cast(asciiName.data())); + return -1 != glGetUniformLocationARB(m_program, reinterpret_cast(asciiName.data())); } return false; } @@ -223,7 +223,7 @@ void GLProgram::setInt(const QString& name, int value) if (!failed()) { QByteArray asciiName = name.toAscii(); - int loc = glGetUniformLocationARB(m_program, static_cast(asciiName.data())); + int loc = glGetUniformLocationARB(m_program, reinterpret_cast(asciiName.data())); glUniform1iARB(loc, value); } } @@ -234,7 +234,7 @@ void GLProgram::setFloat(const QString& name, float value) if (!failed()) { QByteArray asciiName = name.toAscii(); - int loc = glGetUniformLocationARB(m_program, static_cast(asciiName.data())); + int loc = glGetUniformLocationARB(m_program, reinterpret_cast(asciiName.data())); glUniform1fARB(loc, value); } } @@ -246,7 +246,7 @@ void GLProgram::setColor(const QString& name, QRgb value) //qDebug() << "Setting color" << name; if (!failed()) { QByteArray asciiName = name.toAscii(); - int loc = glGetUniformLocationARB(m_program, static_cast(asciiName.data())); + int loc = glGetUniformLocationARB(m_program, reinterpret_cast(asciiName.data())); //qDebug() << "Location of" << name << "is" << loc; QColor color(value); glUniform4fARB(loc, color.redF(), color.greenF(), color.blueF(), color.alphaF()); @@ -259,7 +259,7 @@ void GLProgram::setMatrix(const QString& name, const gfx::Matrix4x4f &mat) if (!failed()) { QByteArray asciiName = name.toAscii(); - int loc = glGetUniformLocationARB(m_program, static_cast(asciiName.data())); + int loc = glGetUniformLocationARB(m_program, reinterpret_cast(asciiName.data())); //qDebug() << "Location of" << name << "is" << loc; glUniformMatrix4fvARB(loc, 1, GL_FALSE, mat.bits()); } -- cgit v0.12 From 96e370f5dd18c54c5afd5cbb8a3c141c4c3cbae3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 10 Jun 2009 20:00:07 +0200 Subject: fix hover selection of source strings snatching ctrl-a from line edits seems to need a shortcut override for some time now --- tools/linguist/linguist/messageeditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp index 53cbbea..c1d5fb37 100644 --- a/tools/linguist/linguist/messageeditor.cpp +++ b/tools/linguist/linguist/messageeditor.cpp @@ -502,6 +502,8 @@ bool MessageEditor::eventFilter(QObject *o, QEvent *e) m_pluralSource->getEditor()->copy(); return true; } + } else if (ke->key() == Qt::Key_A) { + return true; } } } else if (e->type() == QEvent::KeyPress) { -- cgit v0.12 From 7f30a96c2b444d4350aab8c76f129eb57b3bd6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 11 Jun 2009 11:48:38 +0200 Subject: Fixed a problem with disappearing borders in a QTextFrame. The border was always drawn before the background, and if there were both a border and background brush set, the background ended up being drawn ontop of the border. Task-number: 255868 Reviewed-by: Samuel --- src/gui/text/qtextdocumentlayout.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index c66d0c1..3019e60 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -855,6 +855,24 @@ void QTextDocumentLayoutPrivate::drawBorder(QPainter *painter, const QRectF &rec void QTextDocumentLayoutPrivate::drawFrameDecoration(QPainter *painter, QTextFrame *frame, QTextFrameData *fd, const QRectF &clip, const QRectF &rect) const { + + const QBrush bg = frame->frameFormat().background(); + if (bg != Qt::NoBrush) { + QRectF bgRect = rect; + bgRect.adjust((fd->leftMargin + fd->border).toReal(), + (fd->topMargin + fd->border).toReal(), + - (fd->rightMargin + fd->border).toReal(), + - (fd->bottomMargin + fd->border).toReal()); + + QRectF gradientRect; // invalid makes it default to bgRect + QPointF origin = bgRect.topLeft(); + if (!frame->parentFrame()) { + bgRect = clip; + gradientRect.setWidth(painter->device()->width()); + gradientRect.setHeight(painter->device()->height()); + } + fillBackground(painter, bgRect, bg, origin, gradientRect); + } if (fd->border != 0) { painter->save(); painter->setBrush(Qt::lightGray); @@ -875,24 +893,6 @@ void QTextDocumentLayoutPrivate::drawFrameDecoration(QPainter *painter, QTextFra painter->restore(); } - - const QBrush bg = frame->frameFormat().background(); - if (bg != Qt::NoBrush) { - QRectF bgRect = rect; - bgRect.adjust((fd->leftMargin + fd->border).toReal(), - (fd->topMargin + fd->border).toReal(), - - (fd->rightMargin + fd->border).toReal(), - - (fd->bottomMargin + fd->border).toReal()); - - QRectF gradientRect; // invalid makes it default to bgRect - QPointF origin = bgRect.topLeft(); - if (!frame->parentFrame()) { - bgRect = clip; - gradientRect.setWidth(painter->device()->width()); - gradientRect.setHeight(painter->device()->height()); - } - fillBackground(painter, bgRect, bg, origin, gradientRect); - } } static void adjustContextSelectionsForCell(QAbstractTextDocumentLayout::PaintContext &cell_context, -- cgit v0.12 From dd828f95c8f7bc000d808452eef062353ef7dd03 Mon Sep 17 00:00:00 2001 From: kh Date: Thu, 11 Jun 2009 12:11:11 +0200 Subject: No need to bookmark emty pages. Reviewed-by: kh --- tools/assistant/tools/assistant/centralwidget.cpp | 3 +++ tools/assistant/tools/assistant/mainwindow.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index 52d48d5..95e458c 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -780,6 +780,9 @@ void CentralWidget::showTabBarContextMenu(const QPoint &point) menu.addSeparator(); QAction *newBookmark = menu.addAction(tr("Add Bookmark for this Page...")); + const QString &url = viewer->source().toString(); + if (url.isEmpty() || url == QLatin1String("about:blank")) + newBookmark->setEnabled(false); QAction *pickedAction = menu.exec(tabBar->mapToGlobal(point)); if (pickedAction == newPage) diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 582eef3..ba22590 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -748,7 +748,7 @@ void MainWindow::copyAvailable(bool yes) void MainWindow::addNewBookmark(const QString &title, const QString &url) { - if (url.isEmpty()) + if (url.isEmpty() || url == QLatin1String("about:blank")) return; m_bookmarkManager->showBookmarkDialog(this, title, url); -- cgit v0.12 From 65c570e7b0c3699f58a7f271c934b384a7046029 Mon Sep 17 00:00:00 2001 From: kh Date: Thu, 11 Jun 2009 12:19:44 +0200 Subject: Fix wrong home shortcut, now set to ALT+Home. Task-number: 255875 Reviewed-by: kh --- tools/assistant/tools/assistant/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index ba22590..4fc0c78 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -468,7 +468,7 @@ void MainWindow::setupActions() menu = menuBar()->addMenu(tr("&Go")); m_homeAction = menu->addAction(tr("&Home"), m_centralWidget, SLOT(home())); - m_homeAction->setShortcut(tr("Ctrl+Home")); + m_homeAction->setShortcut(tr("ALT+Home")); m_homeAction->setIcon(QIcon(resourcePath + QLatin1String("/home.png"))); m_backAction = menu->addAction(tr("&Back"), m_centralWidget, SLOT(backward())); -- cgit v0.12 From e56fc59124b998b3f237945f4ec1343afe6676ba Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 11 Jun 2009 12:11:55 +0200 Subject: add plural rules for urdu --- tools/linguist/shared/numerus.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/linguist/shared/numerus.cpp b/tools/linguist/shared/numerus.cpp index 50e85cb..8e51114 100644 --- a/tools/linguist/shared/numerus.cpp +++ b/tools/linguist/shared/numerus.cpp @@ -246,6 +246,7 @@ static const QLocale::Language englishStyleLanguages[] = { QLocale::Turkmen, QLocale::Twi, QLocale::Uigur, + QLocale::Urdu, QLocale::Uzbek, QLocale::Volapuk, QLocale::Wolof, -- cgit v0.12 From fcfd6399dcccef350addb992067dccdc6bceb9c7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 11 Jun 2009 12:18:11 +0200 Subject: fix arabic plurals --- tools/linguist/shared/numerus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/linguist/shared/numerus.cpp b/tools/linguist/shared/numerus.cpp index 8e51114..c0960da 100644 --- a/tools/linguist/shared/numerus.cpp +++ b/tools/linguist/shared/numerus.cpp @@ -101,7 +101,7 @@ static const uchar arabicRules[] = Q_EQ, 1, Q_NEWRULE, Q_EQ, 2, Q_NEWRULE, Q_MOD_100 | Q_BETWEEN, 3, 10, Q_NEWRULE, - Q_MOD_100 | Q_NEQ, 0 }; + Q_MOD_100 | Q_NOT | Q_BETWEEN, 0, 2 }; static const uchar tagalogRules[] = { Q_LEQ, 1, Q_NEWRULE, Q_MOD_10 | Q_EQ, 4, Q_OR, Q_MOD_10 | Q_EQ, 6, Q_OR, Q_MOD_10 | Q_EQ, 9 }; @@ -127,7 +127,7 @@ static const char * const malteseForms[] = static const char * const welshForms[] = { "Nullar", "Singular", "Dual", "Sexal", "Plural", 0 }; static const char * const arabicForms[] = - { "Nullar", "Singular", "Dual", "Minority Plural", "Plural", "Plural Form for 100, 200, ...", 0 }; + { "Nullar", "Singular", "Dual", "Minority Plural", "Plural", "Plural (100-102, ...)", 0 }; static const char * const tagalogForms[] = { "Singular", "Plural (consonant-ended)", "Plural (vowel-ended)", 0 }; static const char * const catalanForms[] = { "Singular", "Undecal (11)", "Plural", 0 }; -- cgit v0.12 From dfb61e59f0a1c2113cc01c99c3fd052efa2b6c8e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 10 Jun 2009 10:10:02 +0200 Subject: fix "make debug" under windows use relative path for include (like every other subtree does), otherwise $$fromfile() does not find the file, thus the template is unknown and thus the generic "first" target is used instead of "debug", which tries a generic build against non-existing release libs - boom. Reviewed-by: TrustMe --- src/phonon/phonon.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phonon/phonon.pro b/src/phonon/phonon.pro index ec7e46a..9e7879f 100644 --- a/src/phonon/phonon.pro +++ b/src/phonon/phonon.pro @@ -1,5 +1,5 @@ TARGET = phonon -include($$QT_SOURCE_TREE/src/qbase.pri) +include(../qbase.pri) PHONON_MAJOR_VERSION = $${QT_MAJOR_VERSION} PHONON_MINOR_VERSION = 3 -- cgit v0.12 From 5717e44d47bf5f6be59a59844223ce71b094b08e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 17:08:44 +0200 Subject: turn qm generation into a build time target consequently, remove the qm files from the repository this uses some really black magic to convince qmake to do the right thing. this will be fixed properly in a later version. Reviewed-by: mariusSO --- projects.pro | 5 ++++- translations/assistant_adp_de.qm | Bin 23139 -> 0 bytes translations/assistant_adp_ja.qm | Bin 18357 -> 0 bytes translations/assistant_adp_pl.qm | Bin 22726 -> 0 bytes translations/assistant_adp_zh_CN.qm | Bin 16631 -> 0 bytes translations/assistant_adp_zh_TW.qm | Bin 16555 -> 0 bytes translations/assistant_de.qm | Bin 18688 -> 0 bytes translations/assistant_pl.qm | Bin 18457 -> 0 bytes translations/assistant_zh_CN.qm | Bin 15595 -> 0 bytes translations/assistant_zh_TW.qm | Bin 15567 -> 0 bytes translations/designer_de.qm | Bin 151189 -> 0 bytes translations/designer_ja.qm | Bin 105573 -> 0 bytes translations/designer_pl.qm | Bin 150544 -> 0 bytes translations/designer_zh_CN.qm | Bin 113745 -> 0 bytes translations/designer_zh_TW.qm | Bin 113449 -> 0 bytes translations/linguist_de.qm | Bin 45915 -> 0 bytes translations/linguist_ja.qm | Bin 30494 -> 0 bytes translations/linguist_pl.qm | Bin 50952 -> 0 bytes translations/linguist_zh_CN.qm | Bin 33492 -> 0 bytes translations/linguist_zh_TW.qm | Bin 33735 -> 0 bytes translations/qt_ar.qm | Bin 58499 -> 0 bytes translations/qt_de.qm | Bin 181348 -> 0 bytes translations/qt_es.qm | Bin 117693 -> 0 bytes translations/qt_fr.qm | Bin 148544 -> 0 bytes translations/qt_help_de.qm | Bin 9583 -> 0 bytes translations/qt_help_pl.qm | Bin 9058 -> 0 bytes translations/qt_help_zh_CN.qm | Bin 6434 -> 0 bytes translations/qt_help_zh_TW.qm | Bin 6384 -> 0 bytes translations/qt_iw.qm | Bin 55269 -> 0 bytes translations/qt_ja_JP.qm | Bin 64337 -> 0 bytes translations/qt_pl.qm | Bin 143971 -> 0 bytes translations/qt_pt.qm | Bin 78828 -> 0 bytes translations/qt_ru.qm | Bin 60815 -> 0 bytes translations/qt_sk.qm | Bin 79787 -> 0 bytes translations/qt_sv.qm | Bin 73493 -> 0 bytes translations/qt_uk.qm | Bin 81429 -> 0 bytes translations/qt_zh_CN.qm | Bin 118981 -> 0 bytes translations/qt_zh_TW.qm | Bin 118967 -> 0 bytes translations/qtconfig_pl.qm | Bin 17940 -> 0 bytes translations/qtconfig_zh_CN.qm | Bin 21688 -> 0 bytes translations/qtconfig_zh_TW.qm | Bin 20262 -> 0 bytes translations/qvfb_pl.qm | Bin 4742 -> 0 bytes translations/qvfb_zh_CN.qm | Bin 4853 -> 0 bytes translations/qvfb_zh_TW.qm | Bin 4853 -> 0 bytes translations/translations.pri | 38 +++------------------------------ translations/translations.pro | 41 ++++++++++++++++++++++++++++++++++++ 46 files changed, 48 insertions(+), 36 deletions(-) delete mode 100644 translations/assistant_adp_de.qm delete mode 100644 translations/assistant_adp_ja.qm delete mode 100644 translations/assistant_adp_pl.qm delete mode 100644 translations/assistant_adp_zh_CN.qm delete mode 100644 translations/assistant_adp_zh_TW.qm delete mode 100644 translations/assistant_de.qm delete mode 100644 translations/assistant_pl.qm delete mode 100644 translations/assistant_zh_CN.qm delete mode 100644 translations/assistant_zh_TW.qm delete mode 100644 translations/designer_de.qm delete mode 100644 translations/designer_ja.qm delete mode 100644 translations/designer_pl.qm delete mode 100644 translations/designer_zh_CN.qm delete mode 100644 translations/designer_zh_TW.qm delete mode 100644 translations/linguist_de.qm delete mode 100644 translations/linguist_ja.qm delete mode 100644 translations/linguist_pl.qm delete mode 100644 translations/linguist_zh_CN.qm delete mode 100644 translations/linguist_zh_TW.qm delete mode 100644 translations/qt_ar.qm delete mode 100644 translations/qt_de.qm delete mode 100644 translations/qt_es.qm delete mode 100644 translations/qt_fr.qm delete mode 100644 translations/qt_help_de.qm delete mode 100644 translations/qt_help_pl.qm delete mode 100644 translations/qt_help_zh_CN.qm delete mode 100644 translations/qt_help_zh_TW.qm delete mode 100644 translations/qt_iw.qm delete mode 100644 translations/qt_ja_JP.qm delete mode 100644 translations/qt_pl.qm delete mode 100644 translations/qt_pt.qm delete mode 100644 translations/qt_ru.qm delete mode 100644 translations/qt_sk.qm delete mode 100644 translations/qt_sv.qm delete mode 100644 translations/qt_uk.qm delete mode 100644 translations/qt_zh_CN.qm delete mode 100644 translations/qt_zh_TW.qm delete mode 100644 translations/qtconfig_pl.qm delete mode 100644 translations/qtconfig_zh_CN.qm delete mode 100644 translations/qtconfig_zh_TW.qm delete mode 100644 translations/qvfb_pl.qm delete mode 100644 translations/qvfb_zh_CN.qm delete mode 100644 translations/qvfb_zh_TW.qm create mode 100644 translations/translations.pro diff --git a/projects.pro b/projects.pro index 2596c0a..03ce098 100644 --- a/projects.pro +++ b/projects.pro @@ -37,7 +37,10 @@ for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) { } else:isEqual(PROJECT, docs) { contains(QT_BUILD_PARTS, tools):include(doc/doc.pri) } else:isEqual(PROJECT, translations) { - contains(QT_BUILD_PARTS, tools):include(translations/translations.pri) + contains(QT_BUILD_PARTS, tools) { + include(translations/translations.pri) # ts targets + SUBDIRS += translations # qm build step + } } else:isEqual(PROJECT, qmake) { # SUBDIRS += qmake } else { diff --git a/translations/assistant_adp_de.qm b/translations/assistant_adp_de.qm deleted file mode 100644 index 15ef713..0000000 Binary files a/translations/assistant_adp_de.qm and /dev/null differ diff --git a/translations/assistant_adp_ja.qm b/translations/assistant_adp_ja.qm deleted file mode 100644 index a3b4383..0000000 Binary files a/translations/assistant_adp_ja.qm and /dev/null differ diff --git a/translations/assistant_adp_pl.qm b/translations/assistant_adp_pl.qm deleted file mode 100644 index 1b144e1..0000000 Binary files a/translations/assistant_adp_pl.qm and /dev/null differ diff --git a/translations/assistant_adp_zh_CN.qm b/translations/assistant_adp_zh_CN.qm deleted file mode 100644 index 1685e47..0000000 Binary files a/translations/assistant_adp_zh_CN.qm and /dev/null differ diff --git a/translations/assistant_adp_zh_TW.qm b/translations/assistant_adp_zh_TW.qm deleted file mode 100644 index 8e055c4..0000000 Binary files a/translations/assistant_adp_zh_TW.qm and /dev/null differ diff --git a/translations/assistant_de.qm b/translations/assistant_de.qm deleted file mode 100644 index 5b31aea..0000000 Binary files a/translations/assistant_de.qm and /dev/null differ diff --git a/translations/assistant_pl.qm b/translations/assistant_pl.qm deleted file mode 100644 index 14560b3..0000000 Binary files a/translations/assistant_pl.qm and /dev/null differ diff --git a/translations/assistant_zh_CN.qm b/translations/assistant_zh_CN.qm deleted file mode 100644 index 22a770d..0000000 Binary files a/translations/assistant_zh_CN.qm and /dev/null differ diff --git a/translations/assistant_zh_TW.qm b/translations/assistant_zh_TW.qm deleted file mode 100644 index 41f320e..0000000 Binary files a/translations/assistant_zh_TW.qm and /dev/null differ diff --git a/translations/designer_de.qm b/translations/designer_de.qm deleted file mode 100644 index f9b0a03..0000000 Binary files a/translations/designer_de.qm and /dev/null differ diff --git a/translations/designer_ja.qm b/translations/designer_ja.qm deleted file mode 100644 index 6cf5f89..0000000 Binary files a/translations/designer_ja.qm and /dev/null differ diff --git a/translations/designer_pl.qm b/translations/designer_pl.qm deleted file mode 100644 index bf8d5f7..0000000 Binary files a/translations/designer_pl.qm and /dev/null differ diff --git a/translations/designer_zh_CN.qm b/translations/designer_zh_CN.qm deleted file mode 100644 index 9267123..0000000 Binary files a/translations/designer_zh_CN.qm and /dev/null differ diff --git a/translations/designer_zh_TW.qm b/translations/designer_zh_TW.qm deleted file mode 100644 index fd6460d..0000000 Binary files a/translations/designer_zh_TW.qm and /dev/null differ diff --git a/translations/linguist_de.qm b/translations/linguist_de.qm deleted file mode 100644 index a39c3bf..0000000 Binary files a/translations/linguist_de.qm and /dev/null differ diff --git a/translations/linguist_ja.qm b/translations/linguist_ja.qm deleted file mode 100644 index cdb7c1c..0000000 Binary files a/translations/linguist_ja.qm and /dev/null differ diff --git a/translations/linguist_pl.qm b/translations/linguist_pl.qm deleted file mode 100644 index 2604ffe..0000000 Binary files a/translations/linguist_pl.qm and /dev/null differ diff --git a/translations/linguist_zh_CN.qm b/translations/linguist_zh_CN.qm deleted file mode 100644 index d8081c5..0000000 Binary files a/translations/linguist_zh_CN.qm and /dev/null differ diff --git a/translations/linguist_zh_TW.qm b/translations/linguist_zh_TW.qm deleted file mode 100644 index 9477e56..0000000 Binary files a/translations/linguist_zh_TW.qm and /dev/null differ diff --git a/translations/qt_ar.qm b/translations/qt_ar.qm deleted file mode 100644 index 3d55bf4..0000000 Binary files a/translations/qt_ar.qm and /dev/null differ diff --git a/translations/qt_de.qm b/translations/qt_de.qm deleted file mode 100644 index 9ea09a7..0000000 Binary files a/translations/qt_de.qm and /dev/null differ diff --git a/translations/qt_es.qm b/translations/qt_es.qm deleted file mode 100644 index 0fa1226..0000000 Binary files a/translations/qt_es.qm and /dev/null differ diff --git a/translations/qt_fr.qm b/translations/qt_fr.qm deleted file mode 100644 index 5553086..0000000 Binary files a/translations/qt_fr.qm and /dev/null differ diff --git a/translations/qt_help_de.qm b/translations/qt_help_de.qm deleted file mode 100644 index e3d8d87..0000000 Binary files a/translations/qt_help_de.qm and /dev/null differ diff --git a/translations/qt_help_pl.qm b/translations/qt_help_pl.qm deleted file mode 100644 index bf7fd10..0000000 Binary files a/translations/qt_help_pl.qm and /dev/null differ diff --git a/translations/qt_help_zh_CN.qm b/translations/qt_help_zh_CN.qm deleted file mode 100644 index 11748b7..0000000 Binary files a/translations/qt_help_zh_CN.qm and /dev/null differ diff --git a/translations/qt_help_zh_TW.qm b/translations/qt_help_zh_TW.qm deleted file mode 100644 index b97aae4..0000000 Binary files a/translations/qt_help_zh_TW.qm and /dev/null differ diff --git a/translations/qt_iw.qm b/translations/qt_iw.qm deleted file mode 100644 index 59c1c7e..0000000 Binary files a/translations/qt_iw.qm and /dev/null differ diff --git a/translations/qt_ja_JP.qm b/translations/qt_ja_JP.qm deleted file mode 100644 index b695c97..0000000 Binary files a/translations/qt_ja_JP.qm and /dev/null differ diff --git a/translations/qt_pl.qm b/translations/qt_pl.qm deleted file mode 100644 index f6847d0..0000000 Binary files a/translations/qt_pl.qm and /dev/null differ diff --git a/translations/qt_pt.qm b/translations/qt_pt.qm deleted file mode 100644 index 253a007..0000000 Binary files a/translations/qt_pt.qm and /dev/null differ diff --git a/translations/qt_ru.qm b/translations/qt_ru.qm deleted file mode 100644 index 63b7b8b..0000000 Binary files a/translations/qt_ru.qm and /dev/null differ diff --git a/translations/qt_sk.qm b/translations/qt_sk.qm deleted file mode 100644 index a73ddc6..0000000 Binary files a/translations/qt_sk.qm and /dev/null differ diff --git a/translations/qt_sv.qm b/translations/qt_sv.qm deleted file mode 100644 index 6b1e9cf..0000000 Binary files a/translations/qt_sv.qm and /dev/null differ diff --git a/translations/qt_uk.qm b/translations/qt_uk.qm deleted file mode 100644 index 7cd604a..0000000 Binary files a/translations/qt_uk.qm and /dev/null differ diff --git a/translations/qt_zh_CN.qm b/translations/qt_zh_CN.qm deleted file mode 100644 index e73b0cd..0000000 Binary files a/translations/qt_zh_CN.qm and /dev/null differ diff --git a/translations/qt_zh_TW.qm b/translations/qt_zh_TW.qm deleted file mode 100644 index 699bd5c..0000000 Binary files a/translations/qt_zh_TW.qm and /dev/null differ diff --git a/translations/qtconfig_pl.qm b/translations/qtconfig_pl.qm deleted file mode 100644 index 1a2faa3..0000000 Binary files a/translations/qtconfig_pl.qm and /dev/null differ diff --git a/translations/qtconfig_zh_CN.qm b/translations/qtconfig_zh_CN.qm deleted file mode 100644 index 9998e81..0000000 Binary files a/translations/qtconfig_zh_CN.qm and /dev/null differ diff --git a/translations/qtconfig_zh_TW.qm b/translations/qtconfig_zh_TW.qm deleted file mode 100644 index 3d36679..0000000 Binary files a/translations/qtconfig_zh_TW.qm and /dev/null differ diff --git a/translations/qvfb_pl.qm b/translations/qvfb_pl.qm deleted file mode 100644 index 7230cb6..0000000 Binary files a/translations/qvfb_pl.qm and /dev/null differ diff --git a/translations/qvfb_zh_CN.qm b/translations/qvfb_zh_CN.qm deleted file mode 100644 index 5592f07..0000000 Binary files a/translations/qvfb_zh_CN.qm and /dev/null differ diff --git a/translations/qvfb_zh_TW.qm b/translations/qvfb_zh_TW.qm deleted file mode 100644 index b378ad8..0000000 Binary files a/translations/qvfb_zh_TW.qm and /dev/null differ diff --git a/translations/translations.pri b/translations/translations.pri index 0c5c1ee..c143043 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -8,16 +8,8 @@ defineReplace(prependAll) { return ($$result) } -defineReplace(fixPath) { -WIN { - return ($$replace($$1, /, \)) -} ELSE { - return ($$1) -} -} - -LUPDATE = $$fixPath($$QT_BUILD_TREE/bin/lupdate) -locations relative -no-ui-lines -LRELEASE = $$fixPath($$QT_BUILD_TREE/bin/lrelease) +LUPDATE = $$QT_BUILD_TREE/bin/lupdate -locations relative -no-ui-lines +win32:LUPDATE ~= s|/|\|g ###### Qt Libraries @@ -41,27 +33,18 @@ ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ -ts $$prependAll($$[QT_INSTALL_TRANSLATIONS]/qt_,$$QT_TS,.ts)) ts-qt.depends = sub-tools -qm-qt.commands = $$LRELEASE $$prependAll($$[QT_INSTALL_TRANSLATIONS]/qt_,$$QT_TS,.ts) -qm-qt.depends = sub-tools - ###### Designer ts-designer.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/designer/translations/translations.pro) ts-designer.depends = sub-tools -qm-designer.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/designer/translations/translations.pro -qm-designer.depends = sub-tools - ###### Linguist ts-linguist.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/linguist/linguist/linguist.pro) ts-linguist.depends = sub-tools -qm-linguist.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/linguist/linguist/linguist.pro -qm-linguist.depends = sub-tools - ###### Assistant ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ @@ -72,36 +55,21 @@ ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/assistant/translations/translations_adp.pro) ts-assistant.depends = sub-tools -qm-assistant.commands = ($$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/translations.pro \ - && $$LRELEASE \ - $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro \ - && $$LRELEASE \ - $$QT_SOURCE_TREE/tools/assistant/translations/translations_adp.pro) -qm-assistant.depends = sub-tools - ###### Qtconfig ts-qtconfig.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/qtconfig/translations/translations.pro) ts-qtconfig.depends = sub-tools -qm-qtconfig.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/qtconfig/translations/translations.pro -qm-qtconfig.depends = sub-tools - ###### Qvfp ts-qvfb.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ ../tools/qvfb/translations/translations.pro) ts-qvfb.depends = sub-tools -qm-qvfb.commands = $$LRELEASE $$QT_SOURCE_TREE/tools/qvfb/translations/translations.pro -qm-qvfb.depends = sub-tools - ###### Overall Rules ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb -qm.depends = qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \ - qm-qt qm-designer qm-linguist qm-assistant qm-qtconfig qm-qvfb \ - ts qm + ts diff --git a/translations/translations.pro b/translations/translations.pro new file mode 100644 index 0000000..d1962fe --- /dev/null +++ b/translations/translations.pro @@ -0,0 +1,41 @@ +TRANSLATIONS = $$files(*.ts) + +LRELEASE = $$QT_BUILD_TREE/bin/lrelease +win32:LRELEASE ~= s|/|\|g + +contains(TEMPLATE_PREFIX, vc):vcproj = 1 + +TEMPLATE = app +TARGET = qm_phony_target +CONFIG -= qt separate_debug_info +QT = +LIBS = + +updateqm.input = TRANSLATIONS +updateqm.output = ${QMAKE_FILE_BASE}.qm +isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS +updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} +updateqm.name = LRELEASE ${QMAKE_FILE_IN} +updateqm.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += updateqm + +isEmpty(vcproj) { + QMAKE_LINK = @: IGNORE THIS LINE + OBJECTS_DIR = + win32:CONFIG -= embed_manifest_exe +} else { + CONFIG += console + PHONY_DEPS = . + phony_src.input = PHONY_DEPS + phony_src.output = phony.c + phony_src.variable_out = GENERATED_SOURCES + phony_src.commands = echo int main() { return 0; } > phony.c + phony_src.name = CREATE phony.c + phony_src.CONFIG += combine + QMAKE_EXTRA_COMPILERS += phony_src +} + +translations.path = $$[QT_INSTALL_TRANSLATIONS] +translations.files = $$TRANSLATIONS +translations.files ~= s,\\.ts$,.qm,g +INSTALLS += translations -- cgit v0.12 From c517f6aa06c98ba5fd2f6488cc49e9f66af86fc1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 15:10:06 +0200 Subject: remove dead code seems it was never used since the initial checkin Reviewed-by: mariusSO --- qmake/project.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 00bb2f0..4bb9cca 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -232,14 +232,6 @@ static QScriptValue qscript_projectWrapper(QScriptEngine *eng, QMakeProject *pro return ret; } -static QScriptValue qscript_toArray(QScriptEngine *eng, const QStringList &elts) -{ - QScriptValue a = eng->newArray(); - for (int i = 0; i < elts.count(); ++i) - a.setProperty(i, QScriptValue(eng, elts.at(i))); - return a; -} - QT_END_NAMESPACE #endif -- cgit v0.12 From 6c517a19c67164cab1b29654080b20cf8ff9b8cf Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 15:14:19 +0200 Subject: remove strange no-op Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 67e5bfb..b3b43da 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -289,7 +289,6 @@ MakefileGenerator::initOutPaths() if(Option::fixPathToLocalOS(d.absolutePath()) == Option::fixPathToLocalOS(Option::output_dir)) v.remove("DESTDIR"); } - QDir::current().cd(currentDir); } QMakeProject -- cgit v0.12 From 9d2e3f87aba9e87437c27ef94c9215f8b916bd6a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 15:10:45 +0200 Subject: do not append trailing slash to OUT_PWD in nested pro-files the top-level one doesn't have one, either, so this lead to inconsistent behavior depending on whether the pro was processed directly or from a SUBDIRS target. Reviewed-by: mariusSO --- qmake/generators/metamakefile.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 3f60791..adbe94a 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -332,8 +332,6 @@ SubdirsMetaMakefileGenerator::init() } qmake_setpwd(sub->input_dir); Option::output_dir = sub->output_dir; - if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/')) - Option::output_dir += QLatin1Char('/'); sub_proj->read(subdir.fileName()); if(!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { fprintf(stderr, "Project file(%s) not recursed because all requirements not met:\n\t%s\n", -- cgit v0.12 From 7a5f7db481b6d3743eb89fd127b1355b551e3668 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 9 Jun 2009 15:21:11 +0200 Subject: do not make PWD and OUT_PWD have trailing slashes upon returning from a SUBDIRS target they don't have initially, either. Reviewed-by: mariusSO --- qmake/generators/metamakefile.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index adbe94a..1646b5b 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -289,12 +289,11 @@ SubdirsMetaMakefileGenerator::init() if(Option::recursive) { QString old_output_dir = QDir::cleanPath(Option::output_dir); - if(!old_output_dir.endsWith('/')) - old_output_dir += '/'; QString old_output = Option::output.fileName(); QString oldpwd = QDir::cleanPath(qmake_getpwd()); - if(!oldpwd.endsWith('/')) - oldpwd += '/'; + QString thispwd = oldpwd; + if(!thispwd.endsWith('/')) + thispwd += '/'; const QStringList &subdirs = project->values("SUBDIRS"); static int recurseDepth = -1; ++recurseDepth; @@ -314,8 +313,8 @@ SubdirsMetaMakefileGenerator::init() sub_name = subdir.baseName(); if(!subdir.isRelative()) { //we can try to make it relative QString subdir_path = subdir.filePath(); - if(subdir_path.startsWith(oldpwd)) - subdir = QFileInfo(subdir_path.mid(oldpwd.length())); + if(subdir_path.startsWith(thispwd)) + subdir = QFileInfo(subdir_path.mid(thispwd.length())); } //handle sub project -- cgit v0.12 From 41df2299dad9041b690f28251ba6381563cd3c6b Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 11 Jun 2009 16:47:02 +0200 Subject: Trafficinfo example: Asynchronous call to webservice at launch This makes the main window shown immediatly even when the webservice of traffikanten.no cannot be reached. Does not properly fix the associated task yet, e.g. display an error message. Task-number: 254455 --- examples/xmlpatterns/trafficinfo/mainwindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp index 47c51c9..c797373 100644 --- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp +++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp @@ -69,16 +69,15 @@ MainWindow::MainWindow() setWindowTitle(tr("Traffic Info Oslo")); - QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation())); - timer->start(1000*60*5); - const QSettings settings("Qt Software", "trafficinfo"); m_station = StationInformation(settings.value("stationId", "03012130").toString(), settings.value("stationName", "Nydalen [T-bane] (OSL)").toString()); m_lines = settings.value("lines", QStringList()).toStringList(); - updateTimeInformation(); + QTimer *timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation())); + timer->start(1000*60*5); + QMetaObject::invokeMethod(this, SLOT(updateTimeInformation()), Qt::QueuedConnection); } MainWindow::~MainWindow() -- cgit v0.12 From a982f7f4fa9b406c2736adf47752587691828ab4 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 11 Jun 2009 17:08:21 +0200 Subject: Trafficinfo example: One more asynchronous call Task-number: 254455 --- examples/xmlpatterns/trafficinfo/stationdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp index 54ed904..6c3846b 100644 --- a/examples/xmlpatterns/trafficinfo/stationdialog.cpp +++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp @@ -125,7 +125,7 @@ StationDialog::StationDialog(const QString &name, const QStringList &lineNumbers m_ui.m_line4->setText(lineNumbers.at(i)); } - searchStations(); + QMetaObject::invokeMethod(this, SLOT(searchStations()), Qt::QueuedConnection); } StationInformation StationDialog::selectedStation() const -- cgit v0.12 From b255fc9cee00be96dc54a7b42c290aa5eac07d79 Mon Sep 17 00:00:00 2001 From: kh Date: Thu, 11 Jun 2009 17:25:42 +0200 Subject: We do only support files inside or in subdirs of the help project. Task-number: 255888 Reviewed-by: kh --- doc/src/qthelp.qdoc | 95 ++++++++++++++++++---------------- tools/assistant/lib/qhelpgenerator.cpp | 94 +++++++++++++++++---------------- 2 files changed, 99 insertions(+), 90 deletions(-) diff --git a/doc/src/qthelp.qdoc b/doc/src/qthelp.qdoc index 05bf3e3..2182606 100644 --- a/doc/src/qthelp.qdoc +++ b/doc/src/qthelp.qdoc @@ -96,7 +96,7 @@ generation of the compressed help file. As already mentioned, the Qt compressed help file contains all - data, so there is no need any longer to ship all single html + data, so there is no need any longer to ship all single html files. Instead, only the compressed help file and optionally the collection file has to be distributed. The collection file is optional since any existing collection file, e.g. from an older @@ -211,7 +211,7 @@ \section2 Using QHelpEngine API Instead of showing the help in an external application like the - Qt Assistant, it is also possible to embed the online help in + Qt Assistant, it is also possible to embed the online help in the application. The contents can then be retrieved via the QHelpEngine class and can be displayed in nearly any form. Showing it in a QTextBrowser is probably the most common way, but @@ -238,7 +238,7 @@ Qt Commercial Edition licensees that wish to distribute applications that use these features of the QtHelp module need to be aware of their - obligations under the GNU Lesser General Public License (LGPL). + obligations under the GNU Lesser General Public License (LGPL). Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL; version 2.1 @@ -269,23 +269,23 @@ /*! \page qthelpproject.html \title Qt Help Project - + A Qt help project collects all data necessary to generate a compressed help file. Along with the actual help data, like the table of contents, index keywords and help documents, it contains some extra information like a namespace to identify the help file. One help project stands for one documentation, e.g. the Qt Assistant manual. - + \section1 Qt Help Project File Format - + The file format is XML based. For a better understanding of the format we'll discuss the following example: - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 7 - + \section2 Namespace - + To enable the QHelpEngine to retrieve the proper documentation to a given link, every documentation set has to have a unique identifier. A unique identifier makes is also possible for the @@ -293,10 +293,10 @@ on its file name. The Qt help system uses a namespace as identifier which is defined by the mandatory namespace tags. In the example above, the namespace is "mycompany.com.myapplication.1_0". - + \target Virtual Folders \section2 Virtual Folders - + Having a namespace for every documentation naturally means that the documentation sets are quite separated. From the help engines point of view this is beneficial, but from the documentors view @@ -304,84 +304,86 @@ manual to another without having to specify absolute links. To solve this problem, the help system introduced the concept of virtual folders. - + A virtual folder will become the root directory of all files referenced in a compressed help file. When two documentations share the same virtual folder, they can use relative paths when defining hyperlinks pointing to the other documentation. If a file is contained in both documentations or manuals, the one from the current manual has precedence over the other. - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 8 - + The above example specifies 'doc' as virtual folder. If another manual, e.g. for a small helper tool for 'My Application' specifies the same folder, it is sufficient to write 'doc.html#section1' to reference the first section in the 'My Application' manual. - + The virtual folder tag is mandatory and the folder must not contain any '/'. - + \target Custom Filters \section2 Custom Filters - + Next in the Qt help project file are the optional definitions of - custom filters. A custom filter contains a list of filter + custom filters. A custom filter contains a list of filter attributes which will be used later to display only the documentation which has all those attributes assigned to. So, when setting the current filter in the QHelpEngine to "My Application 1.0" only the documentation which has "myapp" and "1.0" set as filter attributes will be shown. - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 9 - + It is possible to define any number of custom filters in a help project file. Important to know is, that the filter attributes have not to be specified in the same project file; they can be defined in any other help file. The definition of a filter attributes takes place by specifying them in a filter section. - + \target Filter Section - \section2 Filter Section - + \section2 Filter Section + A filter section contains the actual documentation. One Qt help project file may contain more than one filter sections. Every filter section consists of four parts, the filter attributes section, the table of contents, the keywords and the files list. In theory all parts are optional but not specifying anything there will result in an empty documentation. - + \section3 Filter Attributes - + Every filter section should have filter attributes assigned to it, to enable documentation filtering. If no filter attribute is defined, the documentation will only be shown if no filtering occurs, meaning the current custom filter in the QHelpEngine does not contain any filter attributes. - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 10 - + In this case, the filter attributes 'myapp' and '1.0' are assigned to the filter section, i.e. all contents specified in this section will only be shown if the current custom filter has 'myapp' or '1.0' or both as filter attributes. - + \section3 Table of contents - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 11 - + One section tag represents one item in the table of contents. The sections can be nested to any degree, but from a users perspective - it shouldn't be more than four or five levels. A section is defined - by its title and reference. The reference, like all file references - in a Qt help project file are relative to the help project file - itself. - + it should not be more than four or five levels. A section is defined + by its title and reference. The reference, like all file references in a Qt + help project, are relative to the help project file itself. + \note The referenced files must be inside the same directory (or within a + subdirectory) as the help project file. An absolute file path is not supported + either. + \section3 Keywords - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 12 - + The keyword section lists all keywords of this filter section. A keyword consists basically of a name and a file reference. If the attribute 'name' is used then the keyword specified there will appear in @@ -389,15 +391,18 @@ If 'id' is used, the keyword does not appear in the index and is only accessible via the linksForIdentifier() function of the QHelpEngineCore. 'name' and 'id' can be specified at the same time. - + \section3 Files - + \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 13 - + Finally, the actual documentation files have to be listed. Make sure - that all files neccessary to display the help are mentioned, i.e. - stylesheets or similar files need to be there as well. All listed files - will be compressed and written to the Qt compressed help file. So, in the - end, one single Qt help file contains all documentation files along with - the contents and indices. + that all files neccessary to display the help are mentioned, i.e. + stylesheets or similar files need to be there as well. The file, like all + file references in a Qt help project, are relative to the help project file + itself. All listed files will be compressed and written to the Qt compressed + help file. So, in the end, one single Qt help file contains all + documentation files along with the contents and indices. \note The + referenced files must be inside the same directory (or within a subdirectory) + as the help project file. An absolute file path is not supported either. */ diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp index 03df3cc..8512adb 100644 --- a/tools/assistant/lib/qhelpgenerator.cpp +++ b/tools/assistant/lib/qhelpgenerator.cpp @@ -467,8 +467,9 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa emit statusChanged(tr("Insert files...")); QList filterAtts; - foreach (QString filterAtt, filterAttributes) { - d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable WHERE Name=?")); + foreach (const QString &filterAtt, filterAttributes) { + d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable " + "WHERE Name=?")); d->query->bindValue(0, filterAtt); d->query->exec(); if (d->query->next()) @@ -482,76 +483,76 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa if (filterSetId < 0) return false; ++filterSetId; - foreach (int attId, filterAtts) { - d->query->prepare(QLatin1String("INSERT INTO FileAttributeSetTable VALUES(?, ?)")); + foreach (const int &attId, filterAtts) { + d->query->prepare(QLatin1String("INSERT INTO FileAttributeSetTable " + "VALUES(?, ?)")); d->query->bindValue(0, filterSetId); d->query->bindValue(1, attId); d->query->exec(); } - QString title; - QString charSet; - QMap > tmpFileFilterMap; - QList fileNameDataList; - QList fileDataList; - int tableFileId = 1; d->query->exec(QLatin1String("SELECT MAX(Id) FROM FileDataTable")); if (d->query->next()) tableFileId = d->query->value(0).toInt() + 1; + QString title; + QString charSet; FileNameTableData fileNameData; + QList fileDataList; + QMap > tmpFileFilterMap; + QList fileNameDataList; int i = 0; - foreach (QString file, files) { - QFileInfo fi(rootPath + QDir::separator() + file); + foreach (const QString &file, files) { + const QString fileName = QDir::cleanPath(file); + if (fileName.startsWith(QLatin1String("../"))) { + emit warning(tr("The referenced file %1 must be inside or within a " + "subdirectory of (%2). Skipping it.").arg(fileName).arg(rootPath)); + continue; + } + + QFile fi(rootPath + QDir::separator() + fileName); if (!fi.exists()) { emit warning(tr("The file %1 does not exist! Skipping it.") - .arg(fi.absoluteFilePath())); + .arg(QDir::cleanPath(rootPath + QDir::separator() + fileName))); continue; } - QFile f(fi.absoluteFilePath()); - if (!f.open(QIODevice::ReadOnly)) { + if (!fi.open(QIODevice::ReadOnly)) { emit warning(tr("Cannot open file %1! Skipping it.") - .arg(fi.absoluteFilePath())); + .arg(QDir::cleanPath(rootPath + QDir::separator() + fileName))); continue; } - title.clear(); - QByteArray data; - data = f.readAll(); - - if (fi.suffix() == QLatin1String("html") || fi.suffix() == QLatin1String("htm")) { - charSet = QHelpGlobal::charsetFromData(data); - QTextStream stream(&data); - stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData())); - title = QHelpGlobal::documentTitle(stream.readAll()); + QByteArray data = fi.readAll(); + if (fileName.endsWith(QLatin1String(".html")) + || fileName.endsWith(QLatin1String(".htm"))) { + charSet = QHelpGlobal::charsetFromData(data); + QTextStream stream(&data); + stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData())); + title = QHelpGlobal::documentTitle(stream.readAll()); } else { title = fi.fileName(); } - QString fName = QDir::cleanPath(file); - if (fName.startsWith(QLatin1String("./"))) - fName = fName.mid(2); - int fileId = -1; - if (!d->fileMap.contains(fName)) { + if (!d->fileMap.contains(fileName)) { fileDataList.append(qCompress(data)); - fileNameData.name = fName; + fileNameData.name = fileName; fileNameData.fileId = tableFileId; fileNameData.title = title; fileNameDataList.append(fileNameData); - d->fileMap.insert(fName, tableFileId); + d->fileMap.insert(fileName, tableFileId); d->fileFilterMap.insert(tableFileId, filterAtts.toSet()); tmpFileFilterMap.insert(tableFileId, filterAtts.toSet()); ++tableFileId; } else { - fileId = d->fileMap.value(fName); - foreach (int filter, filterAtts) { + fileId = d->fileMap.value(fileName); + foreach (const int &filter, filterAtts) { if (!d->fileFilterMap.value(fileId).contains(filter) && !tmpFileFilterMap.value(fileId).contains(filter)) { d->fileFilterMap[fileId].insert(filter); @@ -565,20 +566,22 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa d->query->exec(QLatin1String("BEGIN")); QMap >::const_iterator it = tmpFileFilterMap.constBegin(); while (it != tmpFileFilterMap.constEnd()) { - QSet::const_iterator i = it.value().constBegin(); - while (i != it.value().constEnd()) { - d->query->prepare(QLatin1String("INSERT INTO FileFilterTable VALUES(?, ?)")); - d->query->bindValue(0, *i); + QSet::const_iterator si = it.value().constBegin(); + while (si != it.value().constEnd()) { + d->query->prepare(QLatin1String("INSERT INTO FileFilterTable " + "VALUES(?, ?)")); + d->query->bindValue(0, *si); d->query->bindValue(1, it.key()); d->query->exec(); - ++i; + ++si; } ++it; } QList::const_iterator fileIt = fileDataList.constBegin(); while (fileIt != fileDataList.constEnd()) { - d->query->prepare(QLatin1String("INSERT INTO FileDataTable VALUES (Null, ?)")); + d->query->prepare(QLatin1String("INSERT INTO FileDataTable VALUES " + "(Null, ?)")); d->query->bindValue(0, *fileIt); d->query->exec(); ++fileIt; @@ -586,10 +589,11 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa addProgress(d->fileStep*20.0); } - QList::const_iterator fileNameIt = fileNameDataList.constBegin(); + QList::const_iterator fileNameIt = + fileNameDataList.constBegin(); while (fileNameIt != fileNameDataList.constEnd()) { - d->query->prepare(QLatin1String("INSERT INTO FileNameTable (FolderId, Name, FileId, Title) " - " VALUES (?, ?, ?, ?)")); + d->query->prepare(QLatin1String("INSERT INTO FileNameTable " + "(FolderId, Name, FileId, Title) VALUES (?, ?, ?, ?)")); d->query->bindValue(0, 1); d->query->bindValue(1, (*fileNameIt).name); d->query->bindValue(2, (*fileNameIt).fileId); @@ -609,8 +613,8 @@ bool QHelpGenerator::insertFiles(const QStringList &files, const QString &rootPa return false; } -bool QHelpGenerator::registerCustomFilter(const QString &filterName, const QStringList &filterAttribs, - bool forceUpdate) +bool QHelpGenerator::registerCustomFilter(const QString &filterName, + const QStringList &filterAttribs, bool forceUpdate) { if (!d->query) return false; -- cgit v0.12 From 1f670c3699f259f0a7e4a0cd1e7aa48be3388ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 11 Jun 2009 17:52:52 +0200 Subject: Fixed the pen dash patterns for Mac. The predefined dash patterns for Mac have always been off, compared to the ones in the raster engine and the GL engine. Task-number: 255292 Reviewed-by: Kim --- src/gui/painting/qpaintengine_mac.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp index 5889388..5a0e84a1 100644 --- a/src/gui/painting/qpaintengine_mac.cpp +++ b/src/gui/painting/qpaintengine_mac.cpp @@ -1496,23 +1496,23 @@ QCoreGraphicsPaintEnginePrivate::setStrokePen(const QPen &pen) for(int i = 0; i < customs.size(); ++i) linedashes.append(customs.at(i)); } else if(pen.style() == Qt::DashLine) { - linedashes.append(3); - linedashes.append(1); + linedashes.append(4); + linedashes.append(2); } else if(pen.style() == Qt::DotLine) { linedashes.append(1); - linedashes.append(1); + linedashes.append(2); } else if(pen.style() == Qt::DashDotLine) { - linedashes.append(3); - linedashes.append(1); - linedashes.append(1); + linedashes.append(4); + linedashes.append(2); linedashes.append(1); + linedashes.append(2); } else if(pen.style() == Qt::DashDotDotLine) { - linedashes.append(3); - linedashes.append(1); - linedashes.append(1); - linedashes.append(1); + linedashes.append(4); + linedashes.append(2); linedashes.append(1); + linedashes.append(2); linedashes.append(1); + linedashes.append(2); } const CGFloat cglinewidth = pen.widthF() <= 0.0f ? 1.0f : float(pen.widthF()); for(int i = 0; i < linedashes.size(); ++i) { -- cgit v0.12 From 82a32d2e0fb603d5ebe4e0958ff68501b1f1b75b Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 5 Jun 2009 11:22:51 +0200 Subject: Doc fix: add a link to focus() and focusWidget() from QWidget::setFocus documentation. Reviewed-by: TrustMe --- src/gui/kernel/qwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index baf3278..ae00d65 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -5687,8 +5687,8 @@ bool QWidget::hasFocus() const called from focusOutEvent() or focusInEvent(), you may get an infinite recursion. - \sa hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(), - setFocusPolicy(), QApplication::focusWidget(), grabKeyboard(), + \sa focus(), hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(), + setFocusPolicy(), focusWidget(), QApplication::focusWidget(), grabKeyboard(), grabMouse(), {Keyboard Focus} */ -- cgit v0.12 From 8a745d2a1048ba922232530d36c2fd01d4c92159 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 9 Jun 2009 11:07:22 +0200 Subject: Copy-paste didn't work for application on non-first screen in multiscreen setup. We need to subscribe to xfixes selection notify events on all available screens. Also implemented delayed subscription to xfixes events since we don't really need clipboard change notifications unless the application explicitely asked for by (i.e. created a qclipboard object). Task-number: 255609 Reviewed-by: Bradley T. Hughes --- src/gui/kernel/qapplication_x11.cpp | 8 -------- src/gui/kernel/qclipboard_x11.cpp | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 12155f0..33a896a 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -2057,14 +2057,6 @@ void qt_init(QApplicationPrivate *priv, int, X11->xfixes_major = major; } } - if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) { - const unsigned long eventMask = - XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask; - X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(0), - XA_PRIMARY, eventMask); - X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(0), - ATOM(CLIPBOARD), eventMask); - } #endif // QT_NO_XFIXES #ifndef QT_NO_XCURSOR diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp index 089cc43..4560357 100644 --- a/src/gui/kernel/qclipboard_x11.cpp +++ b/src/gui/kernel/qclipboard_x11.cpp @@ -428,6 +428,20 @@ QClipboard::QClipboard(QObject *parent) // XFixesSelectionNotify events when someone changes the // clipboard. (void)QApplication::desktop(); + +#ifndef QT_NO_XFIXES + if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) { + const unsigned long eventMask = + XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask; + for (int i = 0; i < X11->screenCount; ++i) { + X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i), + XA_PRIMARY, eventMask); + X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i), + ATOM(CLIPBOARD), eventMask); + } + } +#endif // QT_NO_XFIXES + if (X11->time == CurrentTime) { // send a dummy event to myself to get the timestamp from X11. qt_init_timestamp_data data; -- cgit v0.12 From d2b1c2d1c9cf5375d7e1cb7e1b08420eb00bada8 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 12 Jun 2009 11:08:05 +0200 Subject: keep CONFIG+=silent working with the new translations.pro file --- mkspecs/features/silent.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/silent.prf b/mkspecs/features/silent.prf index 66b4bb7..141e6bf 100644 --- a/mkspecs/features/silent.prf +++ b/mkspecs/features/silent.prf @@ -1,6 +1,6 @@ !macx-xcode { QMAKE_CC = @echo compiling $< && $$QMAKE_CC QMAKE_CXX = @echo compiling $< && $$QMAKE_CXX - QMAKE_LINK = @echo linking $@ && $$QMAKE_LINK + !contains(QMAKE_LINK, "@:"):QMAKE_LINK = @echo linking $@ && $$QMAKE_LINK QMAKE_LINK_SHLIB = @echo linking $@ && $$QMAKE_LINK_SHLIB } -- cgit v0.12 From 8d1f218f6b11cff798bcd0b3123a2fe38c4a4142 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Fri, 5 Jun 2009 13:46:29 +0200 Subject: QGraphicsItem::setOpacity(0.0) does not trigger an update of child items Forwarding the ignoreOpacity flag to children in QGraphicsItemPrivate::fullUpdateHelper. This is a complementary fix to task 252913, partly fixed in commit 2e3a5ea44... Reviewed-by: bnilsen BT: yes --- src/gui/graphicsview/qgraphicsitem.cpp | 2 +- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 51 +++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index e8ace65..7b1967b 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3721,7 +3721,7 @@ void QGraphicsItemPrivate::fullUpdateHelper(bool childrenOnly, bool maybeDirtyCl } } foreach (QGraphicsItem *child, children) - child->d_ptr->fullUpdateHelper(false, maybeDirtyClipPath); + child->d_ptr->fullUpdateHelper(false, maybeDirtyClipPath, ignoreOpacity); dirtyChildren = 1; } diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 34a6ab1..3017407 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -207,6 +207,7 @@ private slots: void opacity_data(); void opacity(); void opacity2(); + void opacityZeroUpdates(); void itemStacksBehindParent(); void nestedClipping(); void nestedClippingTransforms(); @@ -5498,7 +5499,7 @@ void tst_QGraphicsItem::itemTransform_unrelated() QCOMPARE(stranger1->itemTransform(stranger2).map(QPointF(10, 10)), QPointF(10, 10)); QCOMPARE(stranger2->itemTransform(stranger1).map(QPointF(10, 10)), QPointF(10, 10)); } - + void tst_QGraphicsItem::opacity_data() { QTest::addColumn("p_opacity"); @@ -5693,6 +5694,54 @@ void tst_QGraphicsItem::opacity2() QCOMPARE(grandChild->repaints, 0); } +void tst_QGraphicsItem::opacityZeroUpdates() +{ + EventTester *parent = new EventTester; + EventTester *child = new EventTester(parent); + + child->setPos(10, 10); + + QGraphicsScene scene; + scene.addItem(parent); + + class MyGraphicsView : public QGraphicsView + { public: + int repaints; + QRegion paintedRegion; + MyGraphicsView(QGraphicsScene *scene) : QGraphicsView(scene), repaints(0) {} + void paintEvent(QPaintEvent *e) + { + ++repaints; + paintedRegion += e->region(); + QGraphicsView::paintEvent(e); + } + void reset() { repaints = 0; paintedRegion = QRegion(); } + }; + + MyGraphicsView view(&scene); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + QTest::qWait(250); + + view.reset(); + parent->setOpacity(0.0); + + QTest::qWait(200); + + // transforming items bounding rect to view coordinates + const QRect childDeviceBoundingRect = child->deviceTransform(view.viewportTransform()) + .mapRect(child->boundingRect()).toRect(); + const QRect parentDeviceBoundingRect = parent->deviceTransform(view.viewportTransform()) + .mapRect(parent->boundingRect()).toRect(); + + QRegion expectedRegion = parentDeviceBoundingRect.adjusted(-2, -2, 2, 2); + expectedRegion += childDeviceBoundingRect.adjusted(-2, -2, 2, 2); + + QCOMPARE(view.paintedRegion, expectedRegion); +} + void tst_QGraphicsItem::itemStacksBehindParent() { QGraphicsRectItem *parent1 = new QGraphicsRectItem(QRectF(0, 0, 100, 50)); -- cgit v0.12 From 304bf2ef0a99882d2d969347f85a330523086fb3 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Fri, 12 Jun 2009 11:59:50 +0200 Subject: Changes for 4.5.2 --- dist/changes-4.5.2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index c2dda0f..bc07c14 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -98,6 +98,13 @@ Third party components - QFontDialog * [252000] Ensure that QFontDialog::getFont() works on Mac OS X. +- QGraphicsItem + * [197802] Dont show children when parent is not visible + * [252913] QGraphicsItem::setOpacity(0.0) does not trigger an update + +- QGraphicsView + * [253415] Reset the 'connectedToScene' flag when changing the scene of a view + - QGraphicsWidget * Fixed a bug with Qt::WidgetWithChildren shortcut context. -- cgit v0.12