VCS: Windows slash display fixing spree.

Task-number: QTCREATORBUG-1795
This commit is contained in:
Friedemann Kleint
2010-07-05 09:52:32 +02:00
parent 87794fb330
commit c3eb4b6611
15 changed files with 104 additions and 48 deletions

View File

@@ -32,6 +32,7 @@
#include <QtCore/QDebug>
#include <QtCore/QFile>
#include <QtCore/QDir>
#include <QtGui/QPushButton>
#include <QtGui/QStandardItemModel>
#include <QtGui/QSortFilterProxyModel>
@@ -230,7 +231,8 @@ bool NickNameDialog::populateModelFromMailCapFile(const QString &fileName,
return true;
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {
*errorMessage = tr("Cannot open '%1': %2").arg(fileName, file.errorString());
*errorMessage = tr("Cannot open '%1': %2").
arg(QDir::toNativeSeparators(fileName), file.errorString());
return false;
}
// Split into lines and read
@@ -241,7 +243,9 @@ bool NickNameDialog::populateModelFromMailCapFile(const QString &fileName,
if (entry.parse(lines.at(i))) {
model->appendRow(entry.toModelRow());
} else {
qWarning("%s: Invalid mail cap entry at line %d: '%s'\n", qPrintable(fileName), i + 1, qPrintable(lines.at(i)));
qWarning("%s: Invalid mail cap entry at line %d: '%s'\n",
qPrintable(QDir::toNativeSeparators(fileName)),
i + 1, qPrintable(lines.at(i)));
}
}
model->sort(0);