From 32743ebb00d374ad18afbed69ab3e94b03699a57 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 04 Aug 2005 07:14:03 +0000 Subject: fix # 0001687: opening desktop file --- (limited to 'noncore/apps') 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
you selected a .desktop file.
Open .desktop file or linked file?" ), tr(".desktop File"), @@ -218,6 +217,8 @@ void TinyKate::open(const QString & filename) realFileName = docLnk.file(); break; }; + } else { + realFileName = filename; } QFileInfo fileInfo( realFileName ); -- cgit v0.9.0.2