Diffstat (limited to 'noncore/apps/tinykate/tinykate.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/tinykate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp index 6164fa5..aecc1bd 100644 --- a/noncore/apps/tinykate/tinykate.cpp +++ b/noncore/apps/tinykate/tinykate.cpp | |||
@@ -32,20 +32,22 @@ | |||
32 | #include "pics/edit-undo.xpm" | 32 | #include "pics/edit-undo.xpm" |
33 | #include "pics/edit-redo.xpm" | 33 | #include "pics/edit-redo.xpm" |
34 | 34 | ||
35 | #include <katedocument.h> | 35 | #include <katedocument.h> |
36 | #include <katehighlight.h> | 36 | #include <katehighlight.h> |
37 | #include <kateview.h> | 37 | #include <kateview.h> |
38 | #include <kglobal.h> | ||
38 | 39 | ||
39 | TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | 40 | TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : |
40 | QMainWindow( parent, name, f ) | 41 | QMainWindow( parent, name, f ) |
41 | { | 42 | { |
42 | nextUnnamed=0; | 43 | nextUnnamed=0; |
43 | currentView=0; | 44 | currentView=0; |
44 | viewCount=0; | 45 | viewCount=0; |
45 | setCaption(tr("TinyKATE")); | 46 | setCaption(tr("TinyKATE")); |
47 | KGlobal::setAppName("TinyKATE"); | ||
46 | 48 | ||
47 | setToolBarsMovable(FALSE); | 49 | setToolBarsMovable(FALSE); |
48 | 50 | ||
49 | QPEToolBar *bar = new QPEToolBar( this ); | 51 | QPEToolBar *bar = new QPEToolBar( this ); |
50 | bar->setHorizontalStretchable( TRUE ); | 52 | bar->setHorizontalStretchable( TRUE ); |
51 | QPEMenuBar *mb = new QPEMenuBar( bar ); | 53 | QPEMenuBar *mb = new QPEMenuBar( bar ); |
@@ -145,12 +147,20 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | |||
145 | 147 | ||
146 | if( qApp->argc() > 1) open(qApp->argv()[1]); | 148 | if( qApp->argc() > 1) open(qApp->argv()[1]); |
147 | else slotNew(); | 149 | else slotNew(); |
148 | 150 | ||
149 | } | 151 | } |
150 | 152 | ||
153 | TinyKate::~TinyKate( ) | ||
154 | { | ||
155 | qWarning("TinyKate destructor\n"); | ||
156 | if( KGlobal::config() != 0 ) { | ||
157 | qWarning("deleting KateConfig object..\n"); | ||
158 | delete KGlobal::config(); | ||
159 | } | ||
160 | } | ||
151 | 161 | ||
152 | void TinyKate::slotOpen( ) | 162 | void TinyKate::slotOpen( ) |
153 | { | 163 | { |
154 | QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, | 164 | QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, |
155 | QPEApplication::documentDir()); | 165 | QPEApplication::documentDir()); |
156 | if (!filename.isEmpty()) { | 166 | if (!filename.isEmpty()) { |