From fbe272267851eeda20bf48aee9a01ac4dd1143c2 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 19 Mar 2002 00:25:30 +0000 Subject: added config entry --- (limited to 'core/apps') diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index d3f5fb4..f56d5d3 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -236,6 +236,7 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) edited=FALSE; edited1=FALSE; setToolBarsMovable( FALSE ); + connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); setIcon( Resource::loadPixmap( "TextEditor" ) ); @@ -407,10 +408,9 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) viewSelection = cfg.readNumEntry( "FileView", 0 ); } -TextEdit::~TextEdit() +void TextEdit::cleanUp() { // save(); - Config cfg("TextEdit"); cfg.setGroup("View"); QFont f = editor->font(); @@ -418,7 +418,12 @@ TextEdit::~TextEdit() cfg.writeEntry("Bold",f.bold()); cfg.writeEntry("Italic",f.italic()); cfg.writeEntry("Wrap",editor->wordWrap() == QMultiLineEdit::WidgetWidth); - cfg.writeEntry( "FileView", viewSelection ); + cfg.writeEntry( "FileView", viewSelection ); + +} + +TextEdit::~TextEdit() +{ } void TextEdit::zoomIn() diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index aca2933..a70b581 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h @@ -71,6 +71,7 @@ private slots: void changeStartConfig(bool); bool save(); bool saveAs(); + void cleanUp(); void editCut(); @@ -111,7 +112,7 @@ private: DocLnk *doc; bool searchVisible; bool bFromDocView; - int viewSelection; + int viewSelection; QAction *zin, *zout; QString currentFileName; }; diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index 1301aed..37ddf15 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro @@ -11,5 +11,5 @@ LIBS += -lqpe TARGET = textedit -TRANSLATIONS = ../i18n/de/textedit.ts -TRANSLATIONS = ../i18n/pt_BR/textedit.ts +TRANSLATIONS += ../i18n/de/textedit.ts +TRANSLATIONS += ../i18n/pt_BR/textedit.ts -- cgit v0.9.0.2