From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ktnef/gui/ktnefmain.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'ktnef/gui/ktnefmain.cpp') diff --git a/ktnef/gui/ktnefmain.cpp b/ktnef/gui/ktnefmain.cpp index ea44edbe1..fd9438e6c 100644 --- a/ktnef/gui/ktnefmain.cpp +++ b/ktnef/gui/ktnefmain.cpp @@ -57,8 +57,8 @@ #define NOT_IMPLEMENTED TQMessageBox::information(this, "ktnef", "Not implemented yet", TQMessageBox::Ok|TQMessageBox::Default, 0) -KTNEFMain::KTNEFMain(TQWidget *parent, const char *name) - : KMainWindow(parent, name) +KTNEFMain::KTNEFMain(TQWidget *tqparent, const char *name) + : KMainWindow(tqparent, name) { setupActions(); setupStatusbar(); @@ -154,7 +154,7 @@ void KTNEFMain::loadFile(const TQString& filename) else { TQPtrList list = parser_->message()->attachmentList(); - QString msg; + TQString msg; msg = i18n( "%n attachment found", "%n attachments found", list.count() ); statusBar()->changeItem(msg, 0); view_->setAttachments(&list); @@ -165,7 +165,7 @@ void KTNEFMain::loadFile(const TQString& filename) void KTNEFMain::openFile() { - QString filename = KFileDialog::getOpenFileName(0,0,this,0); + TQString filename = KFileDialog::getOpenFileName(0,0,this,0); if (!filename.isEmpty()) loadFile(filename); } @@ -173,7 +173,7 @@ void KTNEFMain::viewFile() { KTNEFAttach *attach = view_->getSelection()->first(); KURL url("file:"+extractTemp(attach)); - QString mimename(attach->mimeTag()); + TQString mimename(attach->mimeTag()); if (mimename.isEmpty() || mimename == "application/octet-stream") { @@ -189,7 +189,7 @@ void KTNEFMain::viewFile() TQString KTNEFMain::extractTemp(KTNEFAttach *att) { - QString dir = KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/"; + TQString dir = KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/"; parser_->extractFileTo(att->name(), dir); dir.append(att->name()); return dir; @@ -210,7 +210,7 @@ void KTNEFMain::extractFile() void KTNEFMain::extractFileTo() { - QString dir = KFileDialog::getExistingDirectory(lastdir_, this); + TQString dir = KFileDialog::getExistingDirectory(lastdir_, this); if (!dir.isEmpty()) { extractTo(dir); @@ -220,7 +220,7 @@ void KTNEFMain::extractFileTo() void KTNEFMain::extractAllFiles() { - QString dir = KFileDialog::getExistingDirectory(lastdir_, this); + TQString dir = KFileDialog::getExistingDirectory(lastdir_, this); if (!dir.isEmpty()) { lastdir_ = dir; @@ -230,7 +230,7 @@ void KTNEFMain::extractAllFiles() for (;it.current();++it) if (!parser_->extractFileTo(it.current()->name(), dir)) { - QString msg = i18n( "Unable to extract file \"%1\"" ).arg( it.current()->name() ); + TQString msg = i18n( "Unable to extract file \"%1\"" ).arg( it.current()->name() ); TQMessageBox::critical(this,i18n("Error"),msg,TQMessageBox::Ok|TQMessageBox::Default,0); return; } @@ -247,7 +247,7 @@ void KTNEFMain::propertiesFile() void KTNEFMain::optionDefaultDir() { - QString dirname = KFileDialog::getExistingDirectory(defaultdir_, this); + TQString dirname = KFileDialog::getExistingDirectory(defaultdir_, this); if (!dirname.isEmpty()) { defaultdir_ = dirname; @@ -285,23 +285,23 @@ void KTNEFMain::enableSingleAction(bool on) void KTNEFMain::cleanup() { - QDir d(KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/"); - const QFileInfoList *list = d.entryInfoList(TQDir::Files|TQDir::Hidden,TQDir::Unsorted); - QFileInfoListIterator it(*list); + TQDir d(KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/"); + const TQFileInfoList *list = d.entryInfoList(TQDir::Files|TQDir::Hidden,TQDir::Unsorted); + TQFileInfoListIterator it(*list); for (;it.current();++it) d.remove(it.current()->absFilePath()); } void KTNEFMain::extractTo(const TQString& dirname) { - QString dir = dirname; + TQString dir = dirname; if (dir.right(1) != "/") dir.append("/"); TQPtrList *list = view_->getSelection(); TQPtrListIterator it(*list); for (;it.current();++it) if (!parser_->extractFileTo(it.current()->name(), dir)) { - QString msg = i18n("Unable to extract file \"%1\"").arg( it.current()->name() ); + TQString msg = i18n("Unable to extract file \"%1\"").arg( it.current()->name() ); TQMessageBox::critical(this,i18n("Error"),msg,TQMessageBox::Ok|TQMessageBox::Default,0); return; } @@ -390,7 +390,7 @@ void KTNEFMain::slotShowMessageText() void KTNEFMain::slotSaveMessageText() { TQString rtf = parser_->message()->rtfString(); - TQString filename = KFileDialog::getSaveFileName( TQString::null, TQString::null, this ); + TQString filename = KFileDialog::getSaveFileName( TQString(), TQString(), this ); if ( !filename.isEmpty() ) { TQFile f( filename ); -- cgit v1.2.1