summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-05 18:40:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-05 18:40:44 (GMT)
commit777bf47da36292ffd37ae48a19796aafeb4d922e (patch)
treecd898e657d0e46c882f00686393e55e26ec36301
parentb5a5c7ce06291d4f9cae15383bd35677db277138 (diff)
parentcf14db1f16fffd7755d6200aaa6769a57a9da99d (diff)
downloadQt-777bf47da36292ffd37ae48a19796aafeb4d922e.zip
Qt-777bf47da36292ffd37ae48a19796aafeb4d922e.tar.gz
Qt-777bf47da36292ffd37ae48a19796aafeb4d922e.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: don't use QKeySequence::mnemonic() after all don't use stylesheet for just making labels bold remove the rounded extra frame around the main message editor add const
-rw-r--r--src/corelib/tools/qstringbuilder.h2
-rw-r--r--tools/linguist/linguist/mainwindow.cpp29
-rw-r--r--tools/linguist/linguist/messageeditor.cpp8
-rw-r--r--tools/linguist/linguist/messageeditorwidgets.cpp6
4 files changed, 30 insertions, 15 deletions
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h
index ddb5c7d..74661c2 100644
--- a/src/corelib/tools/qstringbuilder.h
+++ b/src/corelib/tools/qstringbuilder.h
@@ -71,7 +71,7 @@ public:
private:
const int m_size;
- const char *m_data;
+ const char * const m_data;
};
struct Q_CORE_EXPORT QAbstractConcatenable
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 008ebb1..6e5c656 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -94,6 +94,8 @@
#include <QUrl>
#include <QWhatsThis>
+#include <ctype.h>
+
QT_BEGIN_NAMESPACE
static const int MessageMS = 2500;
@@ -2356,13 +2358,28 @@ void MainWindow::updatePhraseDicts()
static bool haveMnemonic(const QString &str)
{
- QString mnemonic = QKeySequence::mnemonic(str);
- if (mnemonic == QLatin1String("Alt+Space")) {
- // "Nobody" ever really uses these, and they are highly annoying
- // because we get a lot of false positives.
- return false;
+ for (const ushort *p = (ushort *)str.constData();; ) { // Assume null-termination
+ ushort c = *p++;
+ if (!c)
+ break;
+ if (c == '&') {
+ c = *p++;
+ if (!c)
+ return false;
+ // "Nobody" ever really uses these alt-space, and they are highly annoying
+ // because we get a lot of false positives.
+ if (c != '&' && c != ' ' && QChar(c).isPrint()) {
+ const ushort *pp = p;
+ for (; ::isalpha(*p); p++) ;
+ if (pp == p || *p != ';')
+ return true;
+ // This looks like a HTML &entity;, so ignore it. As a HTML string
+ // won't contain accels anyway, we can stop scanning here.
+ break;
+ }
+ }
}
- return !mnemonic.isEmpty();
+ return false;
}
void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose)
diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp
index 91c88da..b6c1688 100644
--- a/tools/linguist/linguist/messageeditor.cpp
+++ b/tools/linguist/linguist/messageeditor.cpp
@@ -135,14 +135,6 @@ MessageEditor::MessageEditor(MultiDataModel *dataModel, QMainWindow *parent)
void MessageEditor::setupEditorPage()
{
QFrame *editorPage = new QFrame;
- editorPage->setObjectName(QLatin1String("editorPage"));
-
- editorPage->setStyleSheet(QLatin1String(
- "QFrame#editorPage { border-image: url(:/images/transbox.png) 12 16 16 12 repeat;"
- " border-width: 12px 16px 16px 12px; }"
- "QFrame#editorPage { background-color: white; }"
- "QLabel { font-weight: bold; }"
- ));
editorPage->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
m_source = new FormWidget(tr("Source text"), false);
diff --git a/tools/linguist/linguist/messageeditorwidgets.cpp b/tools/linguist/linguist/messageeditorwidgets.cpp
index 8b4fa62..4d31db2 100644
--- a/tools/linguist/linguist/messageeditorwidgets.cpp
+++ b/tools/linguist/linguist/messageeditorwidgets.cpp
@@ -171,6 +171,9 @@ FormWidget::FormWidget(const QString &label, bool isEditable, QWidget *parent)
layout->setMargin(0);
m_label = new QLabel(this);
+ QFont fnt;
+ fnt.setBold(true);
+ m_label->setFont(fnt);
m_label->setText(label);
layout->addWidget(m_label);
@@ -249,6 +252,9 @@ FormMultiWidget::FormMultiWidget(const QString &label, QWidget *parent)
m_minusIcon(QIcon(QLatin1String(":/images/minus.png")))
{
m_label = new QLabel(this);
+ QFont fnt;
+ fnt.setBold(true);
+ m_label->setFont(fnt);
m_label->setText(label);
m_plusButtons.append(