TaskWindow: Don't complain about not finding files of task that have no file

Change-Id: Ied909ef47153186c9d661110bfaa5089c0296a21
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2013-01-17 15:45:04 +01:00
parent 02b4b8c464
commit c709dcd329

View File

@@ -840,7 +840,8 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
const QString directory = QDir::toNativeSeparators(index.data(TaskModel::File).toString()); const QString directory = QDir::toNativeSeparators(index.data(TaskModel::File).toString());
int secondBaseLine = positions.top() + fm.ascent() + height + leading; int secondBaseLine = positions.top() + fm.ascent() + height + leading;
if (index.data(TaskModel::FileNotFound).toBool()) { if (index.data(TaskModel::FileNotFound).toBool()
&& !directory.isEmpty()) {
QString fileNotFound = tr("File not found: %1").arg(directory); QString fileNotFound = tr("File not found: %1").arg(directory);
painter->setPen(Qt::red); painter->setPen(Qt::red);
painter->drawText(positions.textAreaLeft(), secondBaseLine, fileNotFound); painter->drawText(positions.textAreaLeft(), secondBaseLine, fileNotFound);