summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/tinykate.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/tinykate.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/tinykate.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp
index 3c9a637..9865c35 100644
--- a/noncore/apps/tinykate/tinykate.cpp
+++ b/noncore/apps/tinykate/tinykate.cpp
@@ -11,24 +11,29 @@
* This program is free softwaSre; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation. *
* ONLY VERSION 2 OF THE LICENSE IS APPLICABLE *
* *
***************************************************************************/
-#include <qaction.h>
-#include <qtoolbutton.h>
-#include <qmenubar.h>
-#include <qpe/resource.h>
-#include <qpe/qpeapplication.h>
+#include "tinykate.h"
+
+#include "katedocument.h"
+#include "kglobal.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/ofiledialog.h>
+#include <qpe/resource.h>
+#include <qpe/qpeapplication.h>
-#include "tinykate.h"
+/* QT */
+#include <qaction.h>
+#include <qtoolbutton.h>
+#include <qmenubar.h>
-#include <katedocument.h>
-#include <kglobal.h>
using namespace Opie::Ui;
TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
QMainWindow( parent, name, f )
{
shutDown=false;
@@ -149,21 +154,21 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
else slotNew();
}
TinyKate::~TinyKate( )
{
- qWarning("TinyKate destructor\n");
+ owarn << "TinyKate destructor\n" << oendl;
shutDown=true;
while (currentView!=0) {
slotClose();
}
if( KGlobal::config() != 0 ) {
- qWarning("deleting KateConfig object..\n");
+ owarn << "deleting KateConfig object..\n" << oendl;
delete KGlobal::config();
}
}
void TinyKate::slotOpen( )
{
@@ -178,13 +183,13 @@ void TinyKate::open(const QString & filename)
{
KateDocument *kd= new KateDocument(false, false, this,0,this);
KTextEditor::View *kv;
QFileInfo fi(filename);
QString filenamed = fi.fileName();
tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed );
- qDebug(filename);
+ odebug << filename << oendl;
kd->setDocName( filenamed);
kd->open( filename );
viewCount++;
}
@@ -246,13 +251,13 @@ void TinyKate::slotClose( )
void TinyKate::slotSave() {
// feel free to make this how you want
if (currentView==0) return;
// KateView *kv = (KateView*) currentView;
KateDocument *kd = (KateDocument*) currentView->document();
- // qDebug("saving file "+kd->docName());
+ // odebug << "saving file "+kd->docName() << oendl;
if( kd->docName().isEmpty())
slotSaveAs();
else
kd->saveFile();
// kv->save();
// kd->saveFile();
@@ -262,13 +267,13 @@ void TinyKate::slotSaveAs() {
if (currentView==0) return;
KateDocument *kd = (KateDocument*) currentView->document();
QString filename= OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL,
QString::null);
if (!filename.isEmpty()) {
- qDebug("saving file "+filename);
+ odebug << "saving file "+filename << oendl;
QFileInfo fi(filename);
QString filenamed = fi.fileName();
kd->setDocFile( filename);
kd->setDocName( filenamed);
kd->saveFile();
// KTextEditor::View *dv = currentView;