summaryrefslogtreecommitdiff
path: root/noncore/apps
Side-by-side diff
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/mainwindow/tinykate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/tinykate/mainwindow/tinykate.cpp b/noncore/apps/tinykate/mainwindow/tinykate.cpp
index bbb0be7e..e808a2e 100644
--- a/noncore/apps/tinykate/mainwindow/tinykate.cpp
+++ b/noncore/apps/tinykate/mainwindow/tinykate.cpp
@@ -203,8 +203,7 @@ void TinyKate::open(const QString & filename)
KTextEditor::View *kv;
QString realFileName;
//check if filename is a .desktop file
- if ( filename.find( ".desktop", 0, true ) )
- {
+ if ( filename.find( ".desktop", 0, true ) != -1 ) {
switch ( QMessageBox::warning( this, tr( "TinyKATE" ),
tr("TinyKATE has detected<BR>you selected a <B>.desktop</B> file.<BR>Open <B>.desktop</B> file or <B>linked</B> file?" ),
tr(".desktop File"),
@@ -218,6 +217,8 @@ void TinyKate::open(const QString & filename)
realFileName = docLnk.file();
break;
};
+ } else {
+ realFileName = filename;
}
QFileInfo fileInfo( realFileName );