Task: Make sure file contains non-native separators

This commit is contained in:
Tobias Hunger
2010-10-20 12:56:06 +02:00
parent cda261db58
commit dd62bcc824
10 changed files with 33 additions and 15 deletions

View File

@@ -33,6 +33,7 @@
#include <coreplugin/coreconstants.h>
#include <QtCore/QDir>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QClipboard>
@@ -48,16 +49,18 @@ void CopyTaskHandler::handle(const ProjectExplorer::Task &task)
QString type;
switch (task.type) {
case Task::Error:
type = tr("error: ", "Task is of type error");
//: Task is of type: error
type = tr("error: ");
break;
case Task::Warning:
type = tr("warning: ", "Task is of type warning");
//: Task is of type: warning
type = tr("warning: ");
break;
default:
break;
}
QApplication::clipboard()->setText(task.file + ':' +
QApplication::clipboard()->setText(QDir::toNativeSeparators(task.file) + ':' +
QString::number(task.line) + ": "
+ type + task.description);
}