summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-02-18 23:24:24 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-02-18 23:24:24 (GMT)
commit9fbbd3146c42869d56da8c82501be1e6a6595f36 (patch)
tree092af029342fa1c5a59bc30c85d7257c88718609 /src/gui/kernel
parent4baa9dfb5273d7b501dcb3f456983262c53cc8d1 (diff)
parent52e517b50aafd6cc0bec597abd50d8b3f7e982dd (diff)
downloadQt-9fbbd3146c42869d56da8c82501be1e6a6595f36.zip
Qt-9fbbd3146c42869d56da8c82501be1e6a6595f36.tar.gz
Qt-9fbbd3146c42869d56da8c82501be1e6a6595f36.tar.bz2
Merge remote branch 'origin/4.6' into integration-master-from-4.6
Conflicts: src/corelib/codecs/qtextcodec.h
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp17
-rw-r--r--src/gui/kernel/qsoftkeymanager_p.h2
2 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 6d108b0..7412b06 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -55,24 +55,24 @@ QT_BEGIN_NAMESPACE
QSoftKeyManager *QSoftKeyManagerPrivate::self = 0;
-const char *QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey)
+QString QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey)
{
- const char *softKeyText = 0;
+ QString softKeyText;
switch (standardKey) {
case OkSoftKey:
- softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Ok");
+ softKeyText = QSoftKeyManager::tr("Ok");
break;
case SelectSoftKey:
- softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Select");
+ softKeyText = QSoftKeyManager::tr("Select");
break;
case DoneSoftKey:
- softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Done");
+ softKeyText = QSoftKeyManager::tr("Done");
break;
case MenuSoftKey:
- softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Options");
+ softKeyText = QSoftKeyManager::tr("Options");
break;
case CancelSoftKey:
- softKeyText = QT_TRANSLATE_NOOP("QSoftKeyManager", "Cancel");
+ softKeyText = QSoftKeyManager::tr("Cancel");
break;
default:
break;
@@ -100,8 +100,7 @@ QSoftKeyManager::QSoftKeyManager() :
QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *actionWidget)
{
- const char* text = standardSoftKeyText(standardKey);
- QAction *action = new QAction(QSoftKeyManager::tr(text), actionWidget);
+ QAction *action = new QAction(standardSoftKeyText(standardKey), actionWidget);
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
case MenuSoftKey: // FALL-THROUGH
diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h
index ce902fe..a6fe17e 100644
--- a/src/gui/kernel/qsoftkeymanager_p.h
+++ b/src/gui/kernel/qsoftkeymanager_p.h
@@ -87,6 +87,7 @@ public:
static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
+ static QString standardSoftKeyText(StandardSoftKey standardKey);
protected:
bool event(QEvent *e);
@@ -94,7 +95,6 @@ protected:
private:
QSoftKeyManager();
static QSoftKeyManager *instance();
- static const char *standardSoftKeyText(StandardSoftKey standardKey);
bool appendSoftkeys(const QWidget &source, int level);
QWidget *softkeySource(QWidget *previousSource, bool& recursiveMerging);
bool handleUpdateSoftKeys();