summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_win.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_win.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_win.cpp')
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index 6962674..75a1820 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -214,10 +214,10 @@ static OPENFILENAMEA *qt_win_make_OFNA(QWidget *parent,
aInitSel = "";
} else {
aInitSel = QDir::toNativeSeparators(initialSelection).toLocal8Bit();
- aInitSel.replace("<", "");
- aInitSel.replace(">", "");
- aInitSel.replace("\"", "");
- aInitSel.replace("|", "");
+ aInitSel.replace('<', "");
+ aInitSel.replace('>', "");
+ aInitSel.replace('\"', "");
+ aInitSel.replace('|', "");
}
int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
aInitSel.resize(maxLen + 1); // make room for return value
@@ -286,10 +286,10 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
tTitle = title;
QString initSel = QDir::toNativeSeparators(initialSelection);
if (!initSel.isEmpty()) {
- initSel.replace(QLatin1String("<"), QLatin1String(""));
- initSel.replace(QLatin1String(">"), QLatin1String(""));
- initSel.replace(QLatin1String("\""), QLatin1String(""));
- initSel.replace(QLatin1String("|"), QLatin1String(""));
+ initSel.remove(QLatin1Char('<'));
+ initSel.remove(QLatin1Char('>'));
+ initSel.remove(QLatin1Char('\"'));
+ initSel.remove(QLatin1Char('|'));
}
int maxLen = mode == QFileDialog::ExistingFiles ? maxMultiLen : maxNameLen;
@@ -811,7 +811,7 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args)
QDir::setCurrent(currentDir);
if (!result.isEmpty())
- result.replace(QLatin1String("\\"), QLatin1String("/"));
+ result.replace(QLatin1Char('\\'), QLatin1Char('/'));
return result;
}