summaryrefslogtreecommitdiff
path: root/src/plugins/perforce
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-07-05 09:52:32 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-07-05 09:52:32 +0200
commitc3eb4b661100ba3ff28bee1d66e185b2062638eb (patch)
tree23a88e9bdf332d4da07513451aab0a8ecfa0f495 /src/plugins/perforce
parent87794fb3308f89d0be300cfbb23ebf7e89e87ea4 (diff)
downloadqt-creator-c3eb4b661100ba3ff28bee1d66e185b2062638eb.tar.gz
VCS: Windows slash display fixing spree.
Task-number: QTCREATORBUG-1795
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r--src/plugins/perforce/perforcechecker.cpp15
-rw-r--r--src/plugins/perforce/perforceplugin.cpp11
-rw-r--r--src/plugins/perforce/settingspage.cpp2
3 files changed, 19 insertions, 9 deletions
diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp
index ea48d9db00..377eefc176 100644
--- a/src/plugins/perforce/perforcechecker.cpp
+++ b/src/plugins/perforce/perforcechecker.cpp
@@ -35,6 +35,7 @@
#include <QtCore/QRegExp>
#include <QtCore/QTimer>
#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
#include <QtGui/QApplication>
#include <QtGui/QCursor>
@@ -108,7 +109,8 @@ void PerforceChecker::slotTimeOut()
return;
m_timedOut = true;
Utils::SynchronousProcess::stopProcess(m_process);
- emitFailed(tr("\"%1\" timed out after %2ms.").arg(m_binary).arg(m_timeOutMS));
+ emitFailed(tr("\"%1\" timed out after %2ms.").
+ arg(m_binary).arg(m_timeOutMS));
}
void PerforceChecker::slotError(QProcess::ProcessError error)
@@ -117,7 +119,8 @@ void PerforceChecker::slotError(QProcess::ProcessError error)
return;
switch (error) {
case QProcess::FailedToStart:
- emitFailed(tr("Unable to launch \"%1\": %2").arg(m_binary, m_process.errorString()));
+ emitFailed(tr("Unable to launch \"%1\": %2").
+ arg(QDir::toNativeSeparators(m_binary), m_process.errorString()));
break;
case QProcess::Crashed: // Handled elsewhere
case QProcess::Timedout:
@@ -136,12 +139,13 @@ void PerforceChecker::slotFinished(int exitCode, QProcess::ExitStatus exitStatus
return;
switch (exitStatus) {
case QProcess::CrashExit:
- emitFailed(tr("\"%1\" crashed.").arg(m_binary));
+ emitFailed(tr("\"%1\" crashed.").arg(QDir::toNativeSeparators(m_binary)));
break;
case QProcess::NormalExit:
if (exitCode) {
const QString stdErr = QString::fromLocal8Bit(m_process.readAllStandardError());
- emitFailed(tr("\"%1\" terminated with exit code %2: %3").arg(m_binary).arg(exitCode).arg(stdErr));
+ emitFailed(tr("\"%1\" terminated with exit code %2: %3").
+ arg(QDir::toNativeSeparators(m_binary)).arg(exitCode).arg(stdErr));
} else {
parseOutput(QString::fromLocal8Bit(m_process.readAllStandardOutput()));
}
@@ -178,7 +182,8 @@ void PerforceChecker::parseOutput(const QString &response)
if (fi.exists()) {
emitSucceeded(repositoryRoot);
} else {
- emitFailed(tr("The repository \"%1\" does not exist.").arg(repositoryRoot));
+ emitFailed(tr("The repository \"%1\" does not exist.").
+ arg(QDir::toNativeSeparators(repositoryRoot)));
}
}
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 087ba8c962..ea8e0cd64c 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -1089,7 +1089,9 @@ PerforceResponse PerforcePlugin::fullySynchronousProcess(const QString &workingD
if (process.write(stdInput) == -1) {
Utils::SynchronousProcess::stopProcess(process);
response.error = true;
- response.message = tr("Unable to write input data to process %1: %2").arg(m_settings.p4Command(), process.errorString());
+ response.message = tr("Unable to write input data to process %1: %2").
+ arg(QDir::toNativeSeparators(m_settings.p4Command()),
+ process.errorString());
return response;
}
process.closeWriteChannel();
@@ -1403,7 +1405,8 @@ static inline QString msgWhereFailed(const QString & file, const QString &why)
{
//: Failed to run p4 "where" to resolve a Perforce file name to a local
//: file system name.
- return PerforcePlugin::tr("Error running \"where\" on %1: %2").arg(file, why);
+ return PerforcePlugin::tr("Error running \"where\" on %1: %2").
+ arg(QDir::toNativeSeparators(file), why);
}
// Map a perforce name "//xx" to its real name in the file system
@@ -1458,7 +1461,9 @@ PerforceVersionControl *PerforcePlugin::perforceVersionControl() const
void PerforcePlugin::slotTopLevelFound(const QString &t)
{
m_settings.setTopLevel(t);
- VCSBase::VCSBaseOutputWindow::instance()->appendSilently(tr("Perforce repository: %1").arg(t));
+ const QString msg = tr("Perforce repository: %1").
+ arg(QDir::toNativeSeparators(t));
+ VCSBase::VCSBaseOutputWindow::instance()->appendSilently(msg);
if (Perforce::Constants::debug)
qDebug() << "P4: " << t;
}
diff --git a/src/plugins/perforce/settingspage.cpp b/src/plugins/perforce/settingspage.cpp
index 7f037488f1..5bdfe0f547 100644
--- a/src/plugins/perforce/settingspage.cpp
+++ b/src/plugins/perforce/settingspage.cpp
@@ -71,7 +71,7 @@ void SettingsPageWidget::slotTest()
void SettingsPageWidget::testSucceeded(const QString &repo)
{
- setStatusText(tr("Test succeeded (%1).").arg(repo));
+ setStatusText(tr("Test succeeded (%1).").arg(QDir::toNativeSeparators(repo)));
}
Settings SettingsPageWidget::settings() const