summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2010-02-08 09:30:49 (GMT)
committerck <qt-info@nokia.com>2010-02-08 09:30:49 (GMT)
commit8e74eb07383e909b0514fe174ebbde2c837a58ea (patch)
tree3b5f828d89597327291af53308d29ecad7665c6d /tools
parente26bd0cc9928cd480f03b55f65bce7dcec4337fa (diff)
downloadQt-8e74eb07383e909b0514fe174ebbde2c837a58ea.zip
Qt-8e74eb07383e909b0514fe174ebbde2c837a58ea.tar.gz
Qt-8e74eb07383e909b0514fe174ebbde2c837a58ea.tar.bz2
Compile fixes.
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/bookmarkitem.cpp2
-rw-r--r--tools/assistant/tools/assistant/bookmarkmodel.cpp13
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.cpp9
3 files changed, 12 insertions, 12 deletions
diff --git a/tools/assistant/tools/assistant/bookmarkitem.cpp b/tools/assistant/tools/assistant/bookmarkitem.cpp
index 082ffce..6c3d06c 100644
--- a/tools/assistant/tools/assistant/bookmarkitem.cpp
+++ b/tools/assistant/tools/assistant/bookmarkitem.cpp
@@ -136,3 +136,5 @@ BookmarkItem::dumpTree(int indent) const
foreach (BookmarkItem *item, m_children)
item->dumpTree(indent + 4);
}
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/tools/assistant/bookmarkmodel.cpp b/tools/assistant/tools/assistant/bookmarkmodel.cpp
index f265ca4..c785f16 100644
--- a/tools/assistant/tools/assistant/bookmarkmodel.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmodel.cpp
@@ -149,7 +149,7 @@ BookmarkModel::removeItem(const QModelIndex &index)
return false;
QModelIndexList indexes;
- if (index.rowCount() > 0)
+ if (rowCount(index) > 0)
indexes = collectItems(index);
indexes.append(index);
@@ -220,13 +220,12 @@ BookmarkModel::flags(const QModelIndex &index) const
if (m_editable)
defaultFlags |= Qt::ItemIsEditable;
- if (BookmarkItem *item = itemFromIndex(index)) {
- if (index.data(UserRoleFolder).toBool()) {
- if (index.column() > 0)
- defaultFlags &= ~Qt::ItemIsEditable;
- return defaultFlags | Qt::ItemIsDropEnabled;
- }
+ if (itemFromIndex(index) && index.data(UserRoleFolder).toBool()
+ && index.column() > 0) {
+ defaultFlags &= ~Qt::ItemIsEditable;
+ return defaultFlags | Qt::ItemIsDropEnabled;
}
+
return defaultFlags | Qt::ItemIsDragEnabled;
}
diff --git a/tools/assistant/tools/assistant/cmdlineparser.cpp b/tools/assistant/tools/assistant/cmdlineparser.cpp
index b063830..bbc0c37 100644
--- a/tools/assistant/tools/assistant/cmdlineparser.cpp
+++ b/tools/assistant/tools/assistant/cmdlineparser.cpp
@@ -41,6 +41,7 @@
#include "tracer.h"
#include <QtCore/QFileInfo>
+#include <QtCore/QStringBuilder>
#include <QtGui/QMessageBox>
#include "cmdlineparser.h"
@@ -277,13 +278,11 @@ void CmdLineParser::showMessage(const QString &msg, bool error)
if (m_quiet)
return;
#ifdef Q_OS_WIN
- QString s = QLatin1String("<pre>") + msg + QLatin1String("</pre>");
- const QString &message
- = QCoreApplication::translate("Assistant", "Qt Assistant"), s);
+ QString message = QLatin1String("<pre>") % msg % QLatin1String("</pre>");
if (error)
- QMessageBox::critical(0, message);
+ QMessageBox::critical(0, tr("Error"), message);
else
- QMessageBox::information(0, message);
+ QMessageBox::information(0, tr("Notice"), message);
#else
fprintf(error ? stderr : stdout, "%s\n", qPrintable(msg));
#endif