summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-25 09:24:40 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-25 09:26:26 (GMT)
commit30ed4ee8cee66bcf3ddf001118ba4905a8bfe644 (patch)
tree78e89a182680f32da4b2908d6bd8c06765a12431 /src/gui/dialogs/qfiledialog.cpp
parentbd9197b8c344e2f259f5e1c08a746464a04687bb (diff)
downloadQt-30ed4ee8cee66bcf3ddf001118ba4905a8bfe644.zip
Qt-30ed4ee8cee66bcf3ddf001118ba4905a8bfe644.tar.gz
Qt-30ed4ee8cee66bcf3ddf001118ba4905a8bfe644.tar.bz2
Fixed 'crazy' warnings about using a string instead of a character
Wherever I found that we were using a string instead of a single char I fixed the code. Reviewed-by: olivier
Diffstat (limited to 'src/gui/dialogs/qfiledialog.cpp')
-rw-r--r--src/gui/dialogs/qfiledialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 903cd74..3ccae3a 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -837,8 +837,8 @@ QStringList QFileDialogPrivate::addDefaultSuffixToFiles(const QStringList filesT
// This check is needed since we might be at the root directory
// and on Windows it already ends with slash.
QString path = rootPath();
- if (!path.endsWith(QLatin1String("/")))
- path += QLatin1String("/");
+ if (!path.endsWith(QLatin1Char('/')))
+ path += QLatin1Char('/');
path += name;
files.append(path);
}
@@ -2649,7 +2649,7 @@ void QFileDialogPrivate::_q_deleteCurrent()
void QFileDialogPrivate::_q_autoCompleteFileName(const QString &text)
{
- if (text.startsWith(QLatin1String("//")) || text.startsWith(QLatin1String("\\"))) {
+ if (text.startsWith(QLatin1String("//")) || text.startsWith(QLatin1Char('\\'))) {
qFileDialogUi->listView->selectionModel()->clearSelection();
return;
}
@@ -2691,7 +2691,7 @@ void QFileDialogPrivate::_q_updateOkButton()
QStringList files = q->selectedFiles();
QString lineEditText = lineEdit()->text();
- if (lineEditText.startsWith(QLatin1String("//")) || lineEditText.startsWith(QLatin1String("\\"))) {
+ if (lineEditText.startsWith(QLatin1String("//")) || lineEditText.startsWith(QLatin1Char('\\'))) {
button->setEnabled(true);
if (acceptMode == QFileDialog::AcceptSave)
button->setText(isOpenDirectory ? QFileDialog::tr("&Open") : acceptLabel);
@@ -3197,7 +3197,7 @@ QStringList QFSCompletor::splitPath(const QString &path) const
doubleSlash.clear();
#endif
- QRegExp re(QLatin1String("[") + QRegExp::escape(sep) + QLatin1String("]"));
+ QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']'));
#ifdef Q_OS_WIN
QStringList parts = pathCopy.split(re, QString::SkipEmptyParts);