diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-21 23:26:40 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-21 23:26:40 (GMT) |
commit | 5a506eefe1ca8f654dcfc354f8ac39547510becf (patch) | |
tree | 20d3eedfd42b89c6f2b7ae0ce4f9ecf71dbabcf3 /src/declarative/debugger | |
parent | cdd12bf1d4475ad23b49b5e27328bf6c738a0ab3 (diff) | |
download | Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.zip Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.tar.gz Qt-5a506eefe1ca8f654dcfc354f8ac39547510becf.tar.bz2 |
fix warnings
Diffstat (limited to 'src/declarative/debugger')
-rw-r--r-- | src/declarative/debugger/qmlcanvasdebugger.cpp | 4 | ||||
-rw-r--r-- | src/declarative/debugger/qmldebugger.cpp | 20 | ||||
-rw-r--r-- | src/declarative/debugger/qmlobjecttree.cpp | 4 | ||||
-rw-r--r-- | src/declarative/debugger/qmlpropertyview.cpp | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/declarative/debugger/qmlcanvasdebugger.cpp b/src/declarative/debugger/qmlcanvasdebugger.cpp index fe57bf4..21abd2d 100644 --- a/src/declarative/debugger/qmlcanvasdebugger.cpp +++ b/src/declarative/debugger/qmlcanvasdebugger.cpp @@ -76,7 +76,7 @@ QmlCanvasDebugger::QmlCanvasDebugger(QmlWatches *w, QWidget *parent) QObject::connect(y, SIGNAL(valueChanged(int)), this, SLOT(setY(int))); hlayout->addWidget(x); hlayout->addWidget(y); - QPushButton *pb = new QPushButton("Refresh", this); + QPushButton *pb = new QPushButton(tr("Refresh"), this); QObject::connect(pb, SIGNAL(clicked()), this, SLOT(refresh())); hlayout->addWidget(pb); @@ -233,7 +233,7 @@ void QmlCanvasDebugger::setCanvas(QSimpleCanvas *canvas) return; QTreeWidgetItem *root = new QmlCanvasDebuggerItem(m_tree); - root->setText(0, "Root"); + root->setText(0, tr("Root")); root->setExpanded(true); clone(root, m_canvasRoot, m_debugCanvas->root()); } diff --git a/src/declarative/debugger/qmldebugger.cpp b/src/declarative/debugger/qmldebugger.cpp index 49ad8d9..0bbcb2c 100644 --- a/src/declarative/debugger/qmldebugger.cpp +++ b/src/declarative/debugger/qmldebugger.cpp @@ -85,7 +85,7 @@ QmlDebugger::QmlDebugger(QWidget *parent) QObject::connect(m_tree, SIGNAL(addWatch(QObject*,QString)), this, SLOT(addWatch(QObject*,QString))); vlayout->addWidget(m_tree); - QPushButton *pb = new QPushButton("Refresh", treeWid); + QPushButton *pb = new QPushButton(tr("Refresh"), treeWid); QObject::connect(pb, SIGNAL(clicked()), this, SLOT(refresh())); vlayout->addWidget(pb); @@ -93,28 +93,28 @@ QmlDebugger::QmlDebugger(QWidget *parent) m_text = new QPlainTextEdit(this); m_text->setReadOnly(true); - tabs->addTab(m_text, "File"); + tabs->addTab(m_text, tr("File")); m_warnings = new QTreeWidget(this); m_warnings->setHeaderHidden(true); - tabs->addTab(m_warnings, "Warnings"); + tabs->addTab(m_warnings, tr("Warnings")); m_watches = new QmlWatches(this); m_watchTable = new QTableView(this); m_watchTable->setSelectionMode(QTableWidget::NoSelection); m_watchTable->setModel(m_watches); - tabs->addTab(m_watchTable, "Watches"); + tabs->addTab(m_watchTable, tr("Watches")); m_properties = new QmlPropertyView(m_watches, this); QObject::connect(m_properties, SIGNAL(objectClicked(quint32)), this, SLOT(highlightObject(quint32))); - tabs->addTab(m_properties, "Properties"); + tabs->addTab(m_properties, tr("Properties")); tabs->setCurrentWidget(m_properties); m_canvas = new QmlCanvasDebugger(m_watches, this); QObject::connect(m_canvas, SIGNAL(objectClicked(quint32)), this, SLOT(highlightObject(quint32))); - tabs->addTab(m_canvas, "Canvas"); + tabs->addTab(m_canvas, tr("Canvas")); splitter->addWidget(tabs); splitter->setStretchFactor(1, 2); @@ -229,7 +229,7 @@ bool QmlDebugger::makeItem(QObject *obj, QmlDebuggerItem *item) if(QmlBindableValue *bv = qobject_cast<QmlBindableValue *>(obj)) { QmlExpressionPrivate *p = bv->d; - text = bv->property().name() + ": " + bv->expression(); + text = bv->property().name() + QLatin1String(": ") + bv->expression(); item->setForeground(0, Qt::green); item->bindableValue = bv; @@ -281,13 +281,13 @@ bool QmlDebugger::makeItem(QObject *obj, QmlDebuggerItem *item) QString toolTipString; if(!p->url.toString().isEmpty()) { item->url = p->url; - toolTipString = "URL: " + p->url.toString(); + toolTipString = QLatin1String("URL: ") + p->url.toString(); } if(!p->typeName.isEmpty()) { if(!toolTipString.isEmpty()) - toolTipString.prepend("\n"); - toolTipString.prepend("Root type: " + text); + toolTipString.prepend(QLatin1Char('\n')); + toolTipString.prepend(tr("Root type: ") + text); text = p->typeName; } diff --git a/src/declarative/debugger/qmlobjecttree.cpp b/src/declarative/debugger/qmlobjecttree.cpp index fb6825a..27dc000 100644 --- a/src/declarative/debugger/qmlobjecttree.cpp +++ b/src/declarative/debugger/qmlobjecttree.cpp @@ -57,7 +57,7 @@ void QmlObjectTree::mousePressEvent(QMouseEvent *me) { QTreeWidget::mousePressEvent(me); if(me->button() == Qt::RightButton && me->type() == QEvent::MouseButtonPress) { - QAction action("Add watch...", 0); + QAction action(tr("Add watch..."), 0); QList<QAction *> actions; actions << &action; QmlDebuggerItem *item = static_cast<QmlDebuggerItem *>(currentItem()); @@ -65,7 +65,7 @@ void QmlObjectTree::mousePressEvent(QMouseEvent *me) QMenu::exec(actions, me->globalPos())) { bool ok = false; - QString watch = QInputDialog::getText(this, "Watch expression", "Expression:", QLineEdit::Normal, QString(), &ok); + QString watch = QInputDialog::getText(this, tr("Watch expression"), tr("Expression:"), QLineEdit::Normal, QString(), &ok); if(ok && !watch.isEmpty()) emit addWatch(item->object, watch); diff --git a/src/declarative/debugger/qmlpropertyview.cpp b/src/declarative/debugger/qmlpropertyview.cpp index e32393c..0d34fd9 100644 --- a/src/declarative/debugger/qmlpropertyview.cpp +++ b/src/declarative/debugger/qmlpropertyview.cpp @@ -56,7 +56,7 @@ QmlPropertyView::QmlPropertyView(QmlWatches *watches, QWidget *parent) setLayout(layout); m_tree = new QTreeWidget(this); - m_tree->setHeaderLabels(QStringList() << "Property" << "Value"); + m_tree->setHeaderLabels(QStringList() << tr("Property") << tr("Value")); QObject::connect(m_tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem *))); QObject::connect(m_tree, SIGNAL(itemClicked(QTreeWidgetItem *, int)), |