diff options
author | Timothy Pearson <[email protected]> | 2011-12-18 18:32:40 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-18 18:32:40 -0600 |
commit | 984c25aa6969e55896e9a13c8e7f7b8a58991a4e (patch) | |
tree | 3653d4ee49b0adf405ff17e0ecdc99bc6f10c1bf /kio | |
parent | 56160bf4dfe503631ef6373367b281f081bab2b4 (diff) | |
download | tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.tar.gz tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kio')
72 files changed, 372 insertions, 372 deletions
diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc index 9721788a2..44b8b496c 100644 --- a/kio/bookmarks/kbookmark.cc +++ b/kio/bookmarks/kbookmark.cc @@ -447,7 +447,7 @@ void KBookmark::updateAccessMetadata() { kdDebug(7043) << "KBookmark::updateAccessMetadata " << address() << " " << url().prettyURL() << endl; - const uint timet = TQDateTime::tqcurrentDateTime().toTime_t(); + const uint timet = TQDateTime::currentDateTime().toTime_t(); setMetaDataItem( "time_added", TQString::number( timet ), DontOverwriteMetaData ); setMetaDataItem( "time_visited", TQString::number( timet ) ); diff --git a/kio/bookmarks/kbookmarkbar.cc b/kio/bookmarks/kbookmarkbar.cc index 158caf373..08c34061b 100644 --- a/kio/bookmarks/kbookmarkbar.cc +++ b/kio/bookmarks/kbookmarkbar.cc @@ -313,7 +313,7 @@ static TQString handleToolbarDragMoveEvent( int index = 0; KToolBarButton* b; - b = dynamic_cast<KToolBarButton*>(tb->tqchildAt(pos)); + b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); KAction *a = 0; TQString address; atFirst = false; @@ -394,7 +394,7 @@ static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions Q_ASSERT(tb); KToolBarButton *b; - b = dynamic_cast<KToolBarButton*>(tb->tqchildAt(pos)); + b = dynamic_cast<KToolBarButton*>(tb->childAt(pos)); if (!b) return 0; diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc b/kio/bookmarks/kbookmarkimporter_ns.cc index e4e074107..5521bee7e 100644 --- a/kio/bookmarks/kbookmarkimporter_ns.cc +++ b/kio/bookmarks/kbookmarkimporter_ns.cc @@ -191,7 +191,7 @@ void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) { fstream.setEncoding(m_utf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale); TQString charset - = m_utf8 ? "UTF-8" : TQString::tqfromLatin1(TQTextCodec::codecForLocale()->name()).upper(); + = m_utf8 ? "UTF-8" : TQString::fromLatin1(TQTextCodec::codecForLocale()->name()).upper(); fstream << "<!DOCTYPE NETSCAPE-Bookmark-file-1>" << endl << i18n("<!-- This file was generated by Konqueror -->") << endl diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc index 250d62a59..96ce12896 100644 --- a/kio/bookmarks/kbookmarkmanager.cc +++ b/kio/bookmarks/kbookmarkmanager.cc @@ -329,7 +329,7 @@ bool KBookmarkManager::saveAs( const TQString & filename, bool toolbarCache ) co // Save the bookmark toolbar folder for quick loading // but only when it will actually make things quicker - const TQString cacheFilename = filename + TQString::tqfromLatin1(".tbcache"); + const TQString cacheFilename = filename + TQString::fromLatin1(".tbcache"); if(toolbarCache && !root().isToolbarGroup()) { KSaveFile cacheFile( cacheFilename ); @@ -388,7 +388,7 @@ KBookmarkGroup KBookmarkManager::toolbar() if(!m_docIsLoaded) { kdDebug(7043) << "KBookmarkManager::toolbar trying cache" << endl; - const TQString cacheFilename = m_bookmarksFile + TQString::tqfromLatin1(".tbcache"); + const TQString cacheFilename = m_bookmarksFile + TQString::fromLatin1(".tbcache"); TQFileInfo bmInfo(m_bookmarksFile); TQFileInfo cacheInfo(cacheFilename); if (m_toolbarDoc.isNull() && @@ -614,11 +614,11 @@ void KBookmarkManager::setEditorOptions( const TQString& caption, bool browser ) void KBookmarkManager::slotEditBookmarks() { KProcess proc; - proc << TQString::tqfromLatin1("keditbookmarks"); + proc << TQString::fromLatin1("keditbookmarks"); if (!dptr()->m_editorCaption.isNull()) - proc << TQString::tqfromLatin1("--customcaption") << dptr()->m_editorCaption; + proc << TQString::fromLatin1("--customcaption") << dptr()->m_editorCaption; if (!dptr()->m_browserEditor) - proc << TQString::tqfromLatin1("--nobrowser"); + proc << TQString::fromLatin1("--nobrowser"); proc << m_bookmarksFile; proc.start(KProcess::DontCare); } @@ -626,8 +626,8 @@ void KBookmarkManager::slotEditBookmarks() void KBookmarkManager::slotEditBookmarksAtAddress( const TQString& address ) { KProcess proc; - proc << TQString::tqfromLatin1("keditbookmarks") - << TQString::tqfromLatin1("--address") << address + proc << TQString::fromLatin1("keditbookmarks") + << TQString::fromLatin1("--address") << address << m_bookmarksFile; proc.start(KProcess::DontCare); } @@ -690,7 +690,7 @@ void KBookmarkManager::updateFavicon( const TQString &url, const TQString &favic TQString KBookmarkManager::userBookmarksFile() { - return locateLocal("data", TQString::tqfromLatin1("konqueror/bookmarks.xml")); + return locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml")); } KBookmarkManager* KBookmarkManager::userBookmarksManager() diff --git a/kio/httpfilter/httpfilter.cc b/kio/httpfilter/httpfilter.cc index a7e8c87c9..6a5a1346c 100644 --- a/kio/httpfilter/httpfilter.cc +++ b/kio/httpfilter/httpfilter.cc @@ -81,7 +81,7 @@ HTTPFilterMD5::HTTPFilterMD5() TQString HTTPFilterMD5::md5() { - return TQString::tqfromLatin1(context.base64Digest()); + return TQString::fromLatin1(context.base64Digest()); } void diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h index 3c5b7c09b..8715ed273 100644 --- a/kio/kfile/config-kfile.h +++ b/kio/kfile/config-kfile.h @@ -3,7 +3,7 @@ const int kfile_area = 250; -#define DefaultViewStyle TQString::tqfromLatin1("SimpleView") +#define DefaultViewStyle TQString::fromLatin1("SimpleView") #define DefaultPannerPosition 40 #define DefaultMixDirsAndFiles false #define DefaultShowStatusLine false @@ -14,19 +14,19 @@ const int kfile_area = 250; #define DefaultRecentURLsNumber 15 #define DefaultDirectoryFollowing true #define DefaultAutoSelectExtChecked true -#define ConfigGroup TQString::tqfromLatin1("KFileDialog Settings") -#define RecentURLs TQString::tqfromLatin1("Recent URLs") -#define RecentFiles TQString::tqfromLatin1("Recent Files") -#define RecentURLsNumber TQString::tqfromLatin1("Maximum of recent URLs") -#define RecentFilesNumber TQString::tqfromLatin1("Maximum of recent files") -#define DialogWidth TQString::tqfromLatin1("Width (%1)") -#define DialogHeight TQString::tqfromLatin1("Height (%1)") -#define ConfigShowStatusLine TQString::tqfromLatin1("ShowStatusLine") -#define AutoDirectoryFollowing TQString::tqfromLatin1("Automatic directory following") -#define PathComboCompletionMode TQString::tqfromLatin1("PathCombo Completionmode") -#define LocationComboCompletionMode TQString::tqfromLatin1("LocationCombo Completionmode") -#define ShowSpeedbar TQString::tqfromLatin1("Show Speedbar") -#define ShowBookmarks TQString::tqfromLatin1("Show Bookmarks") -#define AutoSelectExtChecked TQString::tqfromLatin1("Automatically select filename extension") +#define ConfigGroup TQString::fromLatin1("KFileDialog Settings") +#define RecentURLs TQString::fromLatin1("Recent URLs") +#define RecentFiles TQString::fromLatin1("Recent Files") +#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs") +#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files") +#define DialogWidth TQString::fromLatin1("Width (%1)") +#define DialogHeight TQString::fromLatin1("Height (%1)") +#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine") +#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following") +#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode") +#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode") +#define ShowSpeedbar TQString::fromLatin1("Show Speedbar") +#define ShowBookmarks TQString::fromLatin1("Show Bookmarks") +#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension") #endif diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp index 99fed814f..64cb16b4b 100644 --- a/kio/kfile/kacleditwidget.cpp +++ b/kio/kfile/kacleditwidget.cpp @@ -582,14 +582,14 @@ KACLListView::KACLListView( TQWidget* parent, const char* name ) struct passwd *user = 0; setpwent(); while ( ( user = getpwent() ) != 0 ) { - m_allUsers << TQString::tqfromLatin1( user->pw_name ); + m_allUsers << TQString::fromLatin1( user->pw_name ); } endpwent(); struct group *gr = 0; setgrent(); while ( ( gr = getgrent() ) != 0 ) { - m_allGroups << TQString::tqfromLatin1( gr->gr_name ); + m_allGroups << TQString::fromLatin1( gr->gr_name ); } endgrent(); m_allUsers.sort(); diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp index 41b4176fa..8ba9d29bb 100644 --- a/kio/kfile/kcombiview.cpp +++ b/kio/kfile/kcombiview.cpp @@ -300,7 +300,7 @@ void KCombiView::slotSortingChanged( TQDir::SortSpec sorting ) KFileView *KCombiView::focusView( KFileView *preferred ) const { - TQWidget *w = tqfocusWidget(); + TQWidget *w = focusWidget(); KFileView *other = (right == preferred) ? left : right; return (preferred && w == preferred->widget()) ? preferred : other; } diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index 753ba1b3a..c5e339b1a 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -111,13 +111,13 @@ KDirOperator::KDirOperator(const KURL& _url, TQString strPath = TQDir::currentDirPath(); strPath.append('/'); currUrl = KURL(); - currUrl.setProtocol(TQString::tqfromLatin1("file")); + currUrl.setProtocol(TQString::fromLatin1("file")); currUrl.setPath(strPath); } else { currUrl = _url; if ( currUrl.protocol().isEmpty() ) - currUrl.setProtocol(TQString::tqfromLatin1("file")); + currUrl.setProtocol(TQString::fromLatin1("file")); currUrl.addPath("/"); // make sure we have a trailing slash! } @@ -414,7 +414,7 @@ bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) { url.addPath( *it ); exists = KIO::NetAccess::exists( url, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( url, tqtopLevelWidget() ); + writeOk = !exists && KIO::NetAccess::mkdir( url, topLevelWidget() ); } if ( exists ) // url was already existant @@ -484,7 +484,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items, if ( doIt ) { KIO::DeleteJob *job = KIO::del( urls, false, showProgress ); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; } @@ -547,7 +547,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items, if ( doIt ) { KIO::CopyJob *job = KIO::trash( urls, showProgress ); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; } @@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward) if ( !isReadable( newurl ) ) { // maybe newurl is a file? check its parent directory - newurl.cd(TQString::tqfromLatin1("..")); + newurl.cd(TQString::fromLatin1("..")); if ( !isReadable( newurl ) ) { resetCursor(); KMessageBox::error(viewWidget(), @@ -777,7 +777,7 @@ KURL KDirOperator::url() const void KDirOperator::cdUp() { KURL tmp(currUrl); - tmp.cd(TQString::tqfromLatin1("..")); + tmp.cd(TQString::fromLatin1("..")); setURL(tmp, true); } @@ -1120,7 +1120,7 @@ void KDirOperator::setDirLister( KDirLister *lister ) dir->setAutoUpdate( true ); - TQWidget* mainWidget = tqtopLevelWidget(); + TQWidget* mainWidget = topLevelWidget(); dir->setMainWindow (mainWidget); kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl; @@ -1253,7 +1253,7 @@ void KDirOperator::slotCompletionMatch(const TQString& match) void KDirOperator::setupActions() { - myActionCollection = new KActionCollection( tqtopLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); + myActionCollection = new KActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" ); @@ -1273,7 +1273,7 @@ void KDirOperator::setupActions() this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) ); new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); - mkdirAction->setIcon( TQString::tqfromLatin1("folder_new") ); + mkdirAction->setIcon( TQString::fromLatin1("folder_new") ); reloadAction->setText( i18n("Reload") ); reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload )); @@ -1293,7 +1293,7 @@ void KDirOperator::setupActions() TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ), myActionCollection, "reversed" ); - TQString sortGroup = TQString::tqfromLatin1("sort"); + TQString sortGroup = TQString::fromLatin1("sort"); byNameAction->setExclusiveGroup( sortGroup ); byDateAction->setExclusiveGroup( sortGroup ); bySizeAction->setExclusiveGroup( sortGroup ); @@ -1337,7 +1337,7 @@ void KDirOperator::setupActions() TQT_SLOT( togglePreview( bool ))); - TQString viewGroup = TQString::tqfromLatin1("view"); + TQString viewGroup = TQString::fromLatin1("view"); shortAction->setExclusiveGroup( viewGroup ); detailedAction->setExclusiveGroup( viewGroup ); @@ -1386,7 +1386,7 @@ void KDirOperator::setupMenu(int whichActions) if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & TQt::ShiftButton)) actionMenu->insert( myActionCollection->action( "trash" ) ); KConfig *globalconfig = KGlobal::config(); - KConfigGroupSaver cs( globalconfig, TQString::tqfromLatin1("KDE") ); + KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & TQt::ShiftButton) || globalconfig->readBoolEntry("ShowDeleteCommand", false)) actionMenu->insert( myActionCollection->action( "delete" ) ); @@ -1450,45 +1450,45 @@ void KDirOperator::readConfig( KConfig *kc, const TQString& group ) defaultView = 0; int sorting = 0; - TQString viewStyle = kc->readEntry( TQString::tqfromLatin1("View Style"), - TQString::tqfromLatin1("Simple") ); - if ( viewStyle == TQString::tqfromLatin1("Detail") ) + TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"), + TQString::fromLatin1("Simple") ); + if ( viewStyle == TQString::fromLatin1("Detail") ) defaultView |= KFile::Detail; else defaultView |= KFile::Simple; - if ( kc->readBoolEntry( TQString::tqfromLatin1("Separate Directories"), + if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"), DefaultMixDirsAndFiles ) ) defaultView |= KFile::SeparateDirs; - if ( kc->readBoolEntry(TQString::tqfromLatin1("Show Preview"), false)) + if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false)) defaultView |= KFile::PreviewContents; - if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort case insensitively"), + if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"), DefaultCaseInsensitive ) ) sorting |= TQDir::IgnoreCase; - if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort directories first"), + if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"), DefaultDirsFirst ) ) sorting |= TQDir::DirsFirst; - TQString name = TQString::tqfromLatin1("Name"); - TQString sortBy = kc->readEntry( TQString::tqfromLatin1("Sort by"), name ); + TQString name = TQString::fromLatin1("Name"); + TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name ); if ( sortBy == name ) sorting |= TQDir::Name; - else if ( sortBy == TQString::tqfromLatin1("Size") ) + else if ( sortBy == TQString::fromLatin1("Size") ) sorting |= TQDir::Size; - else if ( sortBy == TQString::tqfromLatin1("Date") ) + else if ( sortBy == TQString::fromLatin1("Date") ) sorting |= TQDir::Time; mySorting = static_cast<TQDir::SortSpec>( sorting ); setSorting( mySorting ); - if ( kc->readBoolEntry( TQString::tqfromLatin1("Show hidden files"), + if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"), DefaultShowHidden ) ) { showHiddenAction->setChecked( true ); dir->setShowingDotFiles( true ); } - if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort reversed"), + if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"), DefaultSortReversed ) ) reverseAction->setChecked( true ); @@ -1505,18 +1505,18 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) if ( !group.isEmpty() ) kc->setGroup( group ); - TQString sortBy = TQString::tqfromLatin1("Name"); + TQString sortBy = TQString::fromLatin1("Name"); if ( KFile::isSortBySize( mySorting ) ) - sortBy = TQString::tqfromLatin1("Size"); + sortBy = TQString::fromLatin1("Size"); else if ( KFile::isSortByDate( mySorting ) ) - sortBy = TQString::tqfromLatin1("Date"); - kc->writeEntry( TQString::tqfromLatin1("Sort by"), sortBy ); + sortBy = TQString::fromLatin1("Date"); + kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy ); - kc->writeEntry( TQString::tqfromLatin1("Sort reversed"), + kc->writeEntry( TQString::fromLatin1("Sort reversed"), reverseAction->isChecked() ); - kc->writeEntry( TQString::tqfromLatin1("Sort case insensitively"), + kc->writeEntry( TQString::fromLatin1("Sort case insensitively"), caseInsensitiveAction->isChecked() ); - kc->writeEntry( TQString::tqfromLatin1("Sort directories first"), + kc->writeEntry( TQString::fromLatin1("Sort directories first"), dirsFirstAction->isChecked() ); // don't save the separate dirs or preview when an application specific @@ -1530,26 +1530,26 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) if ( !appSpecificPreview ) { if ( separateDirsAction->isEnabled() ) - kc->writeEntry( TQString::tqfromLatin1("Separate Directories"), + kc->writeEntry( TQString::fromLatin1("Separate Directories"), separateDirsAction->isChecked() ); KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview")); if ( previewAction->isEnabled() ) { bool hasPreview = previewAction->isChecked(); - kc->writeEntry( TQString::tqfromLatin1("Show Preview"), hasPreview ); + kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview ); } } - kc->writeEntry( TQString::tqfromLatin1("Show hidden files"), + kc->writeEntry( TQString::fromLatin1("Show hidden files"), showHiddenAction->isChecked() ); KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind ); TQString style; if ( KFile::isDetailView( fv ) ) - style = TQString::tqfromLatin1("Detail"); + style = TQString::fromLatin1("Detail"); else if ( KFile::isSimpleView( fv ) ) - style = TQString::tqfromLatin1("Simple"); - kc->writeEntry( TQString::tqfromLatin1("View Style"), style ); + style = TQString::fromLatin1("Simple"); + kc->writeEntry( TQString::fromLatin1("View Style"), style ); kc->setGroup( oldGroup ); } diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp index 10238ad93..9a3d4fc6c 100644 --- a/kio/kfile/kdirselectdialog.cpp +++ b/kio/kfile/kdirselectdialog.cpp @@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item ) { // scroll to make item the topmost item view()->ensureItemVisible( item ); - TQRect r = view()->tqitemRect( item ); + TQRect r = view()->itemRect( item ); if ( r.isValid() ) { int x, y; @@ -426,7 +426,7 @@ void KDirSelectDialog::slotMkdir() { folderurl.addPath( *it ); exists = KIO::NetAccess::exists( folderurl, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( folderurl, tqtopLevelWidget() ); + writeOk = !exists && KIO::NetAccess::mkdir( folderurl, topLevelWidget() ); } if ( exists ) // url was already existant diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp index 2a2f6f0f2..179b69f72 100644 --- a/kio/kfile/kdiskfreesp.cpp +++ b/kio/kfile/kdiskfreesp.cpp @@ -100,7 +100,7 @@ void KDiskFreeSp::dfDone() TQTextStream t (dfStringErrOut, IO_ReadOnly); TQString s=t.readLine(); - if ( (s.isEmpty()) || ( s.left(10) != TQString::tqfromLatin1("Filesystem") ) ) + if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) ) kdError() << "Error running df command... got [" << s << "]" << endl; while ( !t.eof() ) { TQString u,v; diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp index bded7fb79..07098982e 100644 --- a/kio/kfile/kencodingfiledialog.cpp +++ b/kio/kfile/kencodingfiledialog.cpp @@ -54,7 +54,7 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin d->encoding->clear (); TQString sEncoding = encoding; if (sEncoding.isEmpty()) - sEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); + sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); TQStringList encodings (KGlobal::charsets()->availableEncodingNames()); int insert = 0; diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h index 7e0baff83..937c8f56c 100644 --- a/kio/kfile/kfiledetailview.h +++ b/kio/kfile/kfiledetailview.h @@ -78,7 +78,7 @@ public: TQRect rect() const { - TQRect r = listView()->tqitemRect(this); + TQRect r = listView()->itemRect(this); return TQRect( listView()->viewportToContents( r.topLeft() ), TQSize( r.width(), r.height() ) ); } diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index fbc6dd7ab..60f7a7c1c 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -258,7 +258,7 @@ void KFileDialog::setMimeFilter( const TQStringList& mimeTypes, filterWidget->setMimeFilter( mimeTypes, defaultType ); TQStringList types = TQStringList::split(" ", filterWidget->currentFilter()); - types.append( TQString::tqfromLatin1( "inode/directory" )); + types.append( TQString::fromLatin1( "inode/directory" )); ops->clearFilter(); ops->setMimeFilter( types ); d->hasDefaultFilter = !defaultType.isEmpty(); @@ -357,7 +357,7 @@ void KFileDialog::slotOk() bool multi = (mode() & KFile::Files) != 0; KFileItemListIterator it( *items ); - TQString endQuote = TQString::tqfromLatin1("\" "); + TQString endQuote = TQString::fromLatin1("\" "); TQString name, files; while ( it.current() ) { name = (*it)->name(); @@ -402,7 +402,7 @@ void KFileDialog::slotOk() } } - KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { // ### after message freeze, add message for directories! @@ -446,7 +446,7 @@ void KFileDialog::slotOk() return; } - KURL url = KIO::NetAccess::mostLocalURL(selectedURL,tqtopLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { KMessageBox::sorry( d->mainWidget, @@ -555,7 +555,7 @@ void KFileDialog::slotOk() it != list.end(); ++it ) { job = KIO::stat( *it, !(*it).isLocalFile() ); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); KIO::Scheduler::scheduleJob( job ); d->statJobs.append( job ); connect( job, TQT_SIGNAL( result(KIO::Job *) ), @@ -565,7 +565,7 @@ void KFileDialog::slotOk() } job = KIO::stat(d->url,!d->url.isLocalFile()); - job->setWindow (tqtopLevelWidget()); + job->setWindow (topLevelWidget()); d->statJobs.append( job ); connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*))); } @@ -1548,7 +1548,7 @@ TQString KFileDialog::selectedFile() const { if ( result() == TQDialog::Accepted ) { - KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if (url.isLocalFile()) return url.path(); else { @@ -1570,7 +1570,7 @@ TQStringList KFileDialog::selectedFiles() const KURL::List urls = parseSelectedURLs(); TQValueListConstIterator<KURL> it = urls.begin(); while ( it != urls.end() ) { - url = KIO::NetAccess::mostLocalURL(*it,tqtopLevelWidget()); + url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget()); if ( url.isLocalFile() ) list.append( url.path() ); ++it; @@ -1737,7 +1737,7 @@ void KFileDialog::readConfig( KConfig *kc, const TQString& group ) d->autoSelectExtChecked = kc->readBoolEntry (AutoSelectExtChecked, DefaultAutoSelectExtChecked); updateAutoSelectExtension (); - int w1 = tqminimumSize().width(); + int w1 = minimumSize().width(); int w2 = toolbar->sizeHint().width() + 10; if (w1 < w2) setMinimumWidth(w2); @@ -2068,7 +2068,7 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) { // exists? KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, tqtopLevelWidget())) + if (KIO::NetAccess::stat (url, t, topLevelWidget())) { kdDebug (kfile_area) << "\tfile exists" << endl; @@ -2146,7 +2146,7 @@ void KFileDialog::appendExtension (KURL &url) // exists? KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, tqtopLevelWidget())) + if (KIO::NetAccess::stat (url, t, topLevelWidget())) { kdDebug (kfile_area) << "\tfile exists - won't append extension" << endl; return; @@ -2265,7 +2265,7 @@ void KFileDialog::toggleBookmarks(bool show) connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )), TQT_SLOT( enterURL( const TQString& ))); - toolbar->insertButton(TQString::tqfromLatin1("bookmark"), + toolbar->insertButton(TQString::fromLatin1("bookmark"), (int)HOTLIST_BUTTON, true, i18n("Bookmarks"), 5); toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(), diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp index 625321f1a..2849ceb0e 100644 --- a/kio/kfile/kfilefiltercombo.cpp +++ b/kio/kfile/kfilefiltercombo.cpp @@ -129,7 +129,7 @@ void KFileFilterCombo::setMimeFilter( const TQStringList& types, { clear(); filters.clear(); - TQString delim = TQString::tqfromLatin1(", "); + TQString delim = TQString::fromLatin1(", "); d->hasAllSupportedFiles = false; m_allTypes = defaultType.isEmpty() && (types.count() > 1); diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index 90c8e82f2..4171d88d7 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -70,8 +70,8 @@ public: parent->actionCollection(), "large rows" ); - smallColumns->setExclusiveGroup(TQString::tqfromLatin1("IconView mode")); - largeRows->setExclusiveGroup(TQString::tqfromLatin1("IconView mode")); + smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode")); + largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode")); previews = new KToggleAction( i18n("Thumbnail Previews"), 0, parent->actionCollection(), @@ -191,7 +191,7 @@ void KFileIconView::readConfig( KConfig *kc, const TQString& group ) { TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; KConfigGroupSaver cs( kc, gr ); - TQString small = TQString::tqfromLatin1("SmallColumns"); + TQString small = TQString::fromLatin1("SmallColumns"); d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE ); d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) ); @@ -214,8 +214,8 @@ void KFileIconView::writeConfig( KConfig *kc, const TQString& group ) KConfigGroupSaver cs( kc, gr ); TQString viewMode = d->smallColumns->isChecked() ? - TQString::tqfromLatin1("SmallColumns") : - TQString::tqfromLatin1("LargeRows"); + TQString::fromLatin1("SmallColumns") : + TQString::fromLatin1("LargeRows"); if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE ) kc->revertToDefault( "ViewMode" ); else @@ -251,7 +251,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item ) int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 : item->pixmapRect().width() ) - 4; if ( fontMetrics().width( item->text() ) >= w ) { - toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").arg(item->text()), 0, + toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0, "myToolTip", (WFlags)(WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) ); toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); @@ -268,7 +268,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item ) toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } toolTip->setFont( TQToolTip::font() ); - toolTip->tqsetPalette( TQToolTip::palette(), true ); + toolTip->setPalette( TQToolTip::palette(), true ); toolTip->show(); } } @@ -340,10 +340,10 @@ void KFileIconView::insertItem( KFileItem *i ) TQIconView* qview = static_cast<TQIconView*>( this ); // Since creating and initializing an item leads to a tqrepaint, // we disable updates on the IconView for a while. - qview->tqsetUpdatesEnabled( false ); + qview->setUpdatesEnabled( false ); KFileIconViewItem *item = new KFileIconViewItem( qview, i ); initItem( item, i, true ); - qview->tqsetUpdatesEnabled( true ); + qview->setUpdatesEnabled( true ); if ( !i->isMimeTypeKnown() ) m_resolver->m_lstPendingMimeIconItems.append( item ); diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp index 06bce2881..9efe41d46 100644 --- a/kio/kfile/kfiletreeview.cpp +++ b/kio/kfile/kfiletreeview.cpp @@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation() } uint & iconNumber = it.data().iconNumber; - TQString icon = TQString::tqfromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); + TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); // kdDebug(250) << "Loading icon " << icon << endl; item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) ); @@ -666,7 +666,7 @@ void KFileTreeViewToolTip::maybeTip( const TQPoint & ) if ( item ) { TQString text = static_cast<KFileViewItem*>( item )->toolTipText(); if ( !text.isEmpty() ) - tip ( m_view->tqitemRect( item ), text ); + tip ( m_view->itemRect( item ), text ); } #endif } diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index 150536a33..d5faf59b2 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -122,7 +122,7 @@ void KIconCanvas::slotLoadFiles() TQApplication::setOverrideCursor(tqwaitCursor); // disable updates to not trigger paint events when adding child items - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); #ifdef HAVE_LIBART KSVGIconEngine *svgEngine = new KSVGIconEngine(); @@ -191,7 +191,7 @@ void KIconCanvas::slotLoadFiles() #endif // enable updates since we have to draw the whole view now - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); TQApplication::restoreOverrideCursor(); d->m_bLoading = false; @@ -259,7 +259,7 @@ void KIconDialog::init() mGroupOrSize = KIcon::Desktop; mContext = KIcon::Any; mType = 0; - mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::tqfromLatin1("*.png")); + mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); TQWidget *main = new TQWidget( this ); setMainWidget(main); diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index e9a4c2b6f..8787fa19b 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -181,7 +181,7 @@ KNotifyDialog::~KNotifyDialog() void KNotifyDialog::addApplicationEvents( const char *appName ) { addApplicationEvents( TQString::fromUtf8( appName ) + - TQString::tqfromLatin1( "/eventsrc" ) ); + TQString::fromLatin1( "/eventsrc" ) ); } void KNotifyDialog::addApplicationEvents( const TQString& path ) @@ -1005,10 +1005,10 @@ Application::Application( const TQString &path ) m_events = 0L; config = new KConfig(config_file, false, false); kc = new KConfig(path, true, false, "data"); - kc->setGroup( TQString::tqfromLatin1("!Global!") ); - m_icon = kc->readEntry(TQString::tqfromLatin1("IconName"), - TQString::tqfromLatin1("misc")); - m_description = kc->readEntry( TQString::tqfromLatin1("Comment"), + kc->setGroup( TQString::fromLatin1("!Global!") ); + m_icon = kc->readEntry(TQString::fromLatin1("IconName"), + TQString::fromLatin1("misc")); + m_description = kc->readEntry( TQString::fromLatin1("Comment"), i18n("No description available") ); int index = path.find( '/' ); @@ -1070,10 +1070,10 @@ void Application::reloadEvents( bool revertToDefaults ) Event *e = 0L; - TQString global = TQString::tqfromLatin1("!Global!"); - TQString default_group = TQString::tqfromLatin1("<default>"); - TQString name = TQString::tqfromLatin1("Name"); - TQString comment = TQString::tqfromLatin1("Comment"); + TQString global = TQString::fromLatin1("!Global!"); + TQString default_group = TQString::fromLatin1("<default>"); + TQString name = TQString::fromLatin1("Name"); + TQString comment = TQString::fromLatin1("Comment"); TQStringList conflist = kc->groupList(); TQStringList::ConstIterator it = conflist.begin(); diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp index 0b32bc684..30b7d161e 100644 --- a/kio/kfile/kopenwith.cpp +++ b/kio/kfile/kopenwith.cpp @@ -279,8 +279,8 @@ void KApplicationTree::slotSelectionChanged(TQListViewItem* i) void KApplicationTree::resizeEvent( TQResizeEvent * e) { - setColumnWidth(0, width()-TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent) - -2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)); + setColumnWidth(0, width()-TQApplication::tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent) + -2*TQApplication::tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth)); KListView::resizeEvent(e); } @@ -340,7 +340,7 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text, { TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() ); if (_urls.count() > 1) - caption += TQString::tqfromLatin1("..."); + caption += TQString::fromLatin1("..."); setCaption(caption); setServiceType( _urls ); init( _text, _value ); @@ -376,7 +376,7 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls ) if ( _urls.count() == 1 ) { qServiceType = KMimeType::findByURL( _urls.first())->name(); - if (qServiceType == TQString::tqfromLatin1("application/octet-stream")) + if (qServiceType == TQString::fromLatin1("application/octet-stream")) qServiceType = TQString::null; } else @@ -413,13 +413,13 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) KHistoryCombo *combo = new KHistoryCombo(); combo->setDuplicatesEnabled( false ); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") ); - int max = kc->readNumEntry( TQString::tqfromLatin1("Maximum history"), 15 ); + KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); + int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 ); combo->setMaxCount( max ); - int mode = kc->readNumEntry(TQString::tqfromLatin1("CompletionMode"), + int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"), KGlobalSettings::completionMode()); combo->setCompletionMode((KGlobalSettings::Completion)mode); - TQStringList list = kc->readListEntry( TQString::tqfromLatin1("History") ); + TQStringList list = kc->readListEntry( TQString::fromLatin1("History") ); combo->setHistoryItems( list, true ); edit = new KURLRequester( combo, this ); } @@ -483,8 +483,8 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // check to see if we use konsole if not disable the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); - TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); if (bReadOnly || preferredTerminal != "konsole") nocloseonexit->hide(); @@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK() if (terminal->isChecked()) { - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); - preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); m_command = preferredTerminal; // only add --noclose when we are sure it is konsole we're using if (preferredTerminal == "konsole" && nocloseonexit->isChecked()) - m_command += TQString::tqfromLatin1(" --noclose"); - m_command += TQString::tqfromLatin1(" -e "); + m_command += TQString::fromLatin1(" --noclose"); + m_command += TQString::fromLatin1(" -e "); m_command += edit->url(); kdDebug(250) << "Setting m_command to " << m_command << endl; } @@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK() { desktop = new KDesktopFile(newPath); } - desktop->writeEntry("Type", TQString::tqfromLatin1("Application")); + desktop->writeEntry("Type", TQString::fromLatin1("Application")); desktop->writeEntry("Name", initialServiceName); desktop->writePathEntry("Exec", fullExec); if (terminal->isChecked()) @@ -814,9 +814,9 @@ void KOpenWithDlg::accept() combo->addToHistory( edit->url() ); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") ); - kc->writeEntry( TQString::tqfromLatin1("History"), combo->historyItems() ); - kc->writeEntry(TQString::tqfromLatin1("CompletionMode"), + KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); + kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() ); + kc->writeEntry(TQString::fromLatin1("CompletionMode"), combo->completionMode()); // don't store the completion-list, as it contains all of KURLCompletion's // executables diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index 6496b2cdb..2c86f582b 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -516,7 +516,7 @@ void KPropertiesDialog::insertPages() if ( mimetype.isEmpty() ) return; - TQString query = TQString::tqfromLatin1( + TQString query = TQString::fromLatin1( "('KPropsDlg/Plugin' in ServiceTypes) and " "((not exist [X-KDE-Protocol]) or " " ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol()); @@ -718,7 +718,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl; mode_t mode = item->mode(); bool hasDirs = item->isDir() && !item->isLink(); - bool hasRoot = url.path() == TQString::tqfromLatin1("/"); + bool hasRoot = url.path() == TQString::fromLatin1("/"); TQString iconStr = KMimeType::iconForURL(url, mode); TQString directory = properties->kurl().directory(); TQString protocol = properties->kurl().protocol(); @@ -831,7 +831,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) magicMimeComment = TQString::null; } - if ( url.path() == TQString::tqfromLatin1("/") ) + if ( url.path() == TQString::fromLatin1("/") ) hasRoot = true; if ( (*it)->isDir() && !(*it)->isLink() ) { @@ -859,7 +859,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ ) { KIconButton *iconButton = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * iconButton->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * iconButton->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); iconButton->setFixedSize(bsize, bsize); iconButton->setIconSize(48); iconButton->setStrictIconSize(false); @@ -883,7 +883,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) this, TQT_SLOT( slotIconChanged() ) ); } else { TQLabel *iconLabel = new TQLabel( d->m_frame ); - int bsize = 66 + 2 * iconLabel->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * iconLabel->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); iconLabel->setFixedSize(bsize, bsize); iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); iconArea = iconLabel; @@ -942,7 +942,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) //TODO: wrap for win32 or mac? TQPushButton *button = new TQPushButton(box); - TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("configure")); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); button->setIconSet( iconSet ); button->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); @@ -1136,9 +1136,9 @@ void KFilePropsPlugin::slotEditFileType() else mime = d->mimeType; //TODO: wrap for win32 or mac? - TQString keditfiletype = TQString::tqfromLatin1("keditfiletype"); + TQString keditfiletype = TQString::fromLatin1("keditfiletype"); KRun::runCommand( keditfiletype - + " --parent " + TQString::number( (ulong)properties->tqtopLevelWidget()->winId()) + + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId()) + " " + KProcess::quote(mime), keditfiletype, keditfiletype /*unused*/); #endif @@ -1234,7 +1234,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job ) KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize(); KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles(); KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs(); - m_sizeLabel->setText( TQString::tqfromLatin1("%1 (%2)\n%3, %4") + m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4") .arg(KIO::convertSize(totalSize)) .arg(KGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) @@ -1439,7 +1439,7 @@ void KFilePropsPlugin::applyIconChanges() if (S_ISDIR(properties->item()->mode())) { - path = url.path(1) + TQString::tqfromLatin1(".directory"); + path = url.path(1) + TQString::fromLatin1(".directory"); // don't call updateUrl because the other tabs (i.e. permissions) // apply to the directory, not the .directory file. } @@ -1753,7 +1753,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr kcom->setOrder(KCompletion::Sorted); setpwent(); for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::tqfromLatin1(user->pw_name)); + kcom->addItem(TQString::fromLatin1(user->pw_name)); endpwent(); usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto : KGlobalSettings::CompletionNone); @@ -1781,7 +1781,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++) { if (IamRoot) - groupList += TQString::tqfromLatin1(ge->gr_name); + groupList += TQString::fromLatin1(ge->gr_name); else { /* pick the groups to which the user belongs */ @@ -1802,7 +1802,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /* add the effective Group to the list .. */ ge = getgrgid (getegid()); if (ge) { - TQString name = TQString::tqfromLatin1(ge->gr_name); + TQString name = TQString::fromLatin1(ge->gr_name); if (name.isEmpty()) name.setNum(ge->gr_gid); if (groupList.find(name) == groupList.end()) @@ -2639,7 +2639,7 @@ void KURLPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Link")); + config.writeEntry( "Type", TQString::fromLatin1("Link")); config.writePathEntry( "URL", URLEdit->url() ); // Users can't create a Link .desktop file with a Name field, // but distributions can. Update the Name field in that case. @@ -2796,7 +2796,7 @@ void KBindingPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("MimeType") ); + config.writeEntry( "Type", TQString::fromLatin1("MimeType") ); config.writeEntry( "Patterns", patternEdit->text() ); config.writeEntry( "Comment", commentEdit->text() ); @@ -2852,8 +2852,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty() && device != "none") { - devices.append( device + TQString::tqfromLatin1(" (") - + mountPoint + TQString::tqfromLatin1(")") ); + devices.append( device + TQString::fromLatin1(" (") + + mountPoint + TQString::fromLatin1(")") ); m_devicelist.append(device); d->mountpointlist.append(mountPoint); } @@ -2916,7 +2916,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP layout->addMultiCellWidget(sep, 6, 6, 0, 1); unmounted = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * unmounted->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * unmounted->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); unmounted->setFixedSize(bsize, bsize); unmounted->setIconType(KIcon::Desktop, KIcon::Device); layout->addWidget(unmounted, 7, 0); @@ -3077,7 +3077,7 @@ void KDevicePropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("FSDevice") ); + config.writeEntry( "Type", TQString::fromLatin1("FSDevice") ); config.writeEntry( "Dev", device->currentText() ); config.writeEntry( "MountPoint", mountpoint->text() ); @@ -3362,7 +3362,7 @@ void KDesktopPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Application")); + config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Comment", w->commentEdit->text() ); config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat config.writeEntry( "GenericName", w->genNameEdit->text() ); @@ -3446,9 +3446,9 @@ void KDesktopPropsPlugin::slotAdvanced() // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::tqfromLatin1("konsole")); + TQString::fromLatin1("konsole")); bool terminalCloseBool = false; @@ -3493,7 +3493,7 @@ void KDesktopPropsPlugin::slotAdvanced() int i, maxEntries = 1000; setpwent(); for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::tqfromLatin1(pw->pw_name)); + kcom->addItem(TQString::fromLatin1(pw->pw_name)); endpwent(); if (i < maxEntries) { @@ -3672,9 +3672,9 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::tqfromLatin1("konsole")); + TQString::fromLatin1("konsole")); int posOptions = 1; d->nocloseonexitCheck = 0L; @@ -3767,7 +3767,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) int i, maxEntries = 1000; setpwent(); for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::tqfromLatin1(pw->pw_name)); + kcom->addItem(TQString::fromLatin1(pw->pw_name)); endpwent(); if (i < maxEntries) { @@ -3854,7 +3854,7 @@ void KExecPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Application")); + config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writePathEntry( "Exec", execEdit->text() ); config.writePathEntry( "SwallowExec", swallowExecEdit->text() ); config.writeEntry( "SwallowTitle", swallowTitleEdit->text() ); @@ -3862,7 +3862,7 @@ void KExecPropsPlugin::applyChanges() TQString temp = terminalEdit->text(); if (d->nocloseonexitCheck ) if ( d->nocloseonexitCheck->isChecked() ) - temp += TQString::tqfromLatin1("--noclose "); + temp += TQString::fromLatin1("--noclose "); temp = temp.stripWhiteSpace(); config.writeEntry( "TerminalOptions", temp ); config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() ); @@ -4097,7 +4097,7 @@ void KApplicationPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::tqfromLatin1("Application")); + config.writeEntry( "Type", TQString::fromLatin1("Application")); config.writeEntry( "Comment", commentEdit->text() ); config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat config.writeEntry( "GenericName", genNameEdit->text() ); diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp index 85cdebb02..22b4cd477 100644 --- a/kio/kfile/krecentdirs.cpp +++ b/kio/kfile/krecentdirs.cpp @@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool re if (key[1] == ':') { key = key.mid(2); - config = new KSimpleConfig(TQString::tqfromLatin1("krecentdirsrc"), readOnly); + config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly); } else { key = key.mid(1); config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1("Recent Dirs")); + config->setGroup(TQString::fromLatin1("Recent Dirs")); } result=config->readPathListEntry(key); diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp index 7b5c6908a..d691de359 100644 --- a/kio/kfile/krecentdocument.cpp +++ b/kio/kfile/krecentdocument.cpp @@ -45,7 +45,7 @@ TQString KRecentDocument::recentDocumentDirectory() { // need to change this path, not sure where - return locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")); + return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); } TQStringList KRecentDocument::recentDocuments() @@ -88,9 +88,9 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) kdDebug(250) << "KRecentDocument::add for " << openStr << endl; KConfig *config = KGlobal::config(); TQString oldGrp = config->group(); - config->setGroup(TQString::tqfromLatin1("RecentDocuments")); - bool useRecent = config->readBoolEntry(TQString::tqfromLatin1("UseRecent"), true); - int maxEntries = config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); + config->setGroup(TQString::fromLatin1("RecentDocuments")); + bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); + int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); config->setGroup(oldGrp); if(!useRecent) @@ -100,7 +100,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQString dStr = path + url.fileName(); - TQString ddesktop = dStr + TQString::tqfromLatin1(".desktop"); + TQString ddesktop = dStr + TQString::fromLatin1(".desktop"); int i=1; // check for duplicates @@ -108,7 +108,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // see if it points to the same file and application KSimpleConfig tmp(ddesktop); tmp.setDesktopGroup(); - if(tmp.readEntry(TQString::tqfromLatin1("X-KDE-LastOpenedWith")) + if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith")) == desktopEntryName) { utime(TQFile::encodeName(ddesktop), NULL); @@ -118,7 +118,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) ++i; if ( i > maxEntries ) break; - ddesktop = dStr + TQString::tqfromLatin1("[%1].desktop").arg(i); + ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i); } TQDir dir(path); @@ -129,7 +129,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQStringList::Iterator it; it = list.begin(); while(i > maxEntries-1){ - TQFile::remove(dir.absPath() + TQString::tqfromLatin1("/") + (*it)); + TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it)); --i, ++it; } } @@ -137,15 +137,15 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // create the applnk KSimpleConfig conf(ddesktop); conf.setDesktopGroup(); - conf.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") ); - conf.writePathEntry( TQString::tqfromLatin1("URL"), openStr ); + conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); + conf.writePathEntry( TQString::fromLatin1("URL"), openStr ); // If you change the line below, change the test in the above loop - conf.writeEntry( TQString::tqfromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); + conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); TQString name = url.fileName(); if (name.isEmpty()) name = openStr; - conf.writeEntry( TQString::tqfromLatin1("Name"), name ); - conf.writeEntry( TQString::tqfromLatin1("Icon"), KMimeType::iconForURL( url ) ); + conf.writeEntry( TQString::fromLatin1("Name"), name ); + conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); } void KRecentDocument::add(const TQString &openStr, bool isUrl) @@ -170,8 +170,8 @@ void KRecentDocument::clear() int KRecentDocument::maximumItems() { KConfig *config = KGlobal::config(); - KConfigGroupSaver sa(config, TQString::tqfromLatin1("RecentDocuments")); - return config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); + KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); + return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); } diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index 234e8717a..15ac9f35c 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/kurlbar.cpp @@ -64,7 +64,7 @@ protected: if ( item ) { TQString text = static_cast<KURLBarItem*>( item )->toolTip(); if ( !text.isEmpty() ) - tip( m_view->tqitemRect( item ), text ); + tip( m_view->itemRect( item ), text ); } } @@ -188,11 +188,11 @@ void KURLBarItem::paint( TQPainter *p ) if ( isCurrent() || isSelected() ) { int h = height( box ); - TQBrush brush = box->tqcolorGroup().brush( TQColorGroup::Highlight ); + TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight ); p->fillRect( 0, 0, w, h, brush ); TQPen pen = p->pen(); TQPen oldPen = pen; - pen.setColor( box->tqcolorGroup().mid() ); + pen.setColor( box->colorGroup().mid() ); p->setPen( pen ); p->drawPoint( 0, 0 ); @@ -225,10 +225,10 @@ void KURLBarItem::paint( TQPainter *p ) int xPos = pm->width() + margin + 2; if ( isCurrent() || isSelected() ) { - p->setPen( box->tqcolorGroup().highlight().dark(115) ); + p->setPen( box->colorGroup().highlight().dark(115) ); p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1), yPos + 1, visibleText ); - p->setPen( box->tqcolorGroup().highlightedText() ); + p->setPen( box->colorGroup().highlightedText() ); } p->drawText( xPos, yPos, visibleText ); @@ -257,10 +257,10 @@ void KURLBarItem::paint( TQPainter *p ) x = QMAX( x, margin ); if ( isCurrent() || isSelected() ) { - p->setPen( box->tqcolorGroup().highlight().dark(115) ); + p->setPen( box->colorGroup().highlight().dark(115) ); p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1), y + 1, visibleText ); - p->setPen( box->tqcolorGroup().highlightedText() ); + p->setPen( box->colorGroup().highlightedText() ); } p->drawText( x, y, visibleText ); @@ -844,7 +844,7 @@ KURLBarListBox::~KURLBarListBox() void KURLBarListBox::paintEvent( TQPaintEvent* ) { TQPainter p(this); - p.setPen( tqcolorGroup().mid() ); + p.setPen( colorGroup().mid() ); p.drawRect( 0, 0, width(), height() ); } @@ -980,7 +980,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url, if ( KGlobal::instance()->aboutData() ) appName = KGlobal::instance()->aboutData()->programName(); if ( appName.isEmpty() ) - appName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() ); + appName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box ); m_appLocal->setChecked( appLocal ); TQWhatsThis::add( m_appLocal, diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index c9db56756..98e29a90b 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -31,7 +31,7 @@ class KURLComboBox::KURLComboBoxPrivate { public: KURLComboBoxPrivate() { - dirpix = SmallIcon(TQString::tqfromLatin1("folder")); + dirpix = SmallIcon(TQString::fromLatin1("folder")); } TQPixmap dirpix; @@ -72,7 +72,7 @@ void KURLComboBox::init( Mode mode ) setTrapReturnKey( true ); setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); - opendirPix = SmallIcon(TQString::tqfromLatin1("folder_open")); + opendirPix = SmallIcon(TQString::fromLatin1("folder_open")); connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int ))); } diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp index 1a53e7660..5d1495127 100644 --- a/kio/kfile/kurlrequester.cpp +++ b/kio/kfile/kurlrequester.cpp @@ -206,7 +206,7 @@ void KURLRequester::init() d->edit = new KLineEdit( this, "line edit" ); myButton = new KURLDragPushButton( this, "kfile button"); - TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("fileopen")); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); myButton->setIconSet( iconSet ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp index c66ed3ff2..47fcd02ca 100644 --- a/kio/kfile/tests/kdirselectdialogtest.cpp +++ b/kio/kfile/tests/kdirselectdialogtest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null ); if ( u.isValid() ) KMessageBox::information( 0L, - TQString::tqfromLatin1("You selected the url: %1") + TQString::fromLatin1("You selected the url: %1") .arg( u.prettyURL() ), "Selected URL" ); return 0; diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp index 43dbb4fd0..867b9b4a8 100644 --- a/kio/kfile/tests/kfdtest.cpp +++ b/kio/kfile/tests/kfdtest.cpp @@ -25,7 +25,7 @@ void KFDTest::doit() if ( dlg->exec() == KDialog::Accepted ) { - KMessageBox::information(0, TQString::tqfromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); + KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); } // tqApp->quit(); diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp index bad100809..5c520dd5d 100644 --- a/kio/kfile/tests/kfiletreeviewtest.cpp +++ b/kio/kfile/tests/kfiletreeviewtest.cpp @@ -148,7 +148,7 @@ int main(int argc, char **argv) { for( int i = 1; i < argc; i++ ) { - argv1 = TQString::tqfromLatin1(argv[i]); + argv1 = TQString::fromLatin1(argv[i]); kdDebug() << "Opening " << argv1 << endl; if( argv1 == "-d" ) tf->setDirOnly(); diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp index aad57b257..aeeb5b77b 100644 --- a/kio/kfile/tests/kfstest.cpp +++ b/kio/kfile/tests/kfstest.cpp @@ -51,11 +51,11 @@ int main(int argc, char **argv) TQString argv1; TQString startDir; if (argc > 1) - argv1 = TQString::tqfromLatin1(argv[1]); + argv1 = TQString::fromLatin1(argv[1]); if ( argc > 2 ) - startDir = TQString::tqfromLatin1( argv[2]); + startDir = TQString::fromLatin1( argv[2]); - if (argv1 == TQString::tqfromLatin1("diroperator")) { + if (argv1 == TQString::fromLatin1("diroperator")) { KDirOperator *op = new KDirOperator(startDir, 0, "operator"); op->setViewConfig( KGlobal::config(), "TestGroup" ); op->setView(KFile::Simple); @@ -64,24 +64,24 @@ int main(int argc, char **argv) a.exec(); } - else if (argv1 == TQString::tqfromLatin1("justone")) { + else if (argv1 == TQString::fromLatin1("justone")) { TQString name = KFileDialog::getOpenFileName(startDir); qDebug("filename=%s",name.latin1()); } - else if (argv1 == TQString::tqfromLatin1("existingURL")) { + else if (argv1 == TQString::fromLatin1("existingURL")) { KURL url = KFileDialog::getExistingURL(); qDebug("URL=%s",url.url().latin1()); name1 = url.url(); } - else if (argv1 == TQString::tqfromLatin1("preview")) { + else if (argv1 == TQString::fromLatin1("preview")) { KURL u = KFileDialog::getImageOpenURL(); qDebug("filename=%s", u.url().latin1()); } - else if (argv1 == TQString::tqfromLatin1("preselect")) { - names = KFileDialog::getOpenFileNames(TQString::tqfromLatin1("/etc/passwd")); + else if (argv1 == TQString::fromLatin1("preselect")) { + names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd")); TQStringList::Iterator it = names.begin(); while ( it != names.end() ) { qDebug("selected file: %s", (*it).latin1()); @@ -89,10 +89,10 @@ int main(int argc, char **argv) } } - else if (argv1 == TQString::tqfromLatin1("dirs")) + else if (argv1 == TQString::fromLatin1("dirs")) name1 = KFileDialog::getExistingDirectory(); - else if (argv1 == TQString::tqfromLatin1("heap")) { + else if (argv1 == TQString::fromLatin1("heap")) { KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L, "file dialog", true ); dlg->setMode( KFile::File); @@ -104,33 +104,33 @@ int main(int argc, char **argv) if ( urlBar ) { urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"), - TQString::tqfromLatin1("KDE FTP Server") ); + TQString::fromLatin1("KDE FTP Server") ); } if ( dlg->exec() == KDialog::Accepted ) name1 = dlg->selectedURL().url(); } - else if ( argv1 == TQString::tqfromLatin1("eventloop") ) + else if ( argv1 == TQString::fromLatin1("eventloop") ) { KFDTest *test = new KFDTest( startDir ); return a.exec(); } - else if (argv1 == TQString::tqfromLatin1("save")) { + else if (argv1 == TQString::fromLatin1("save")) { KURL u = KFileDialog::getSaveURL(); -// TQString(TQDir::homeDirPath() + TQString::tqfromLatin1("/testfile")), +// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")), // TQString::null, 0L); name1 = u.url(); } - else if (argv1 == TQString::tqfromLatin1("icon")) { + else if (argv1 == TQString::fromLatin1("icon")) { KIconDialog dlg; TQString icon = dlg.selectIcon(); kdDebug() << icon << endl; } -// else if ( argv1 == TQString::tqfromLatin1("dirselect") ) { +// else if ( argv1 == TQString::fromLatin1("dirselect") ) { // KURL url; // url.setPath( "/" ); // KURL selected = KDirSelectDialog::selectDirectory( url ); @@ -140,7 +140,7 @@ int main(int argc, char **argv) else { KFileDialog dlg(startDir, - TQString::tqfromLatin1("*|All Files\n" + TQString::fromLatin1("*|All Files\n" "*.lo *.o *.la|All libtool Files"), 0, 0, true); // dlg.setFilter( "*.tdevelop" ); @@ -177,7 +177,7 @@ int main(int argc, char **argv) } if (!(name1.isNull())) - KMessageBox::information(0, TQString::tqfromLatin1("You selected the file " ) + name1, - TQString::tqfromLatin1("Your Choice")); + KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1, + TQString::fromLatin1("Your Choice")); return 0; } diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp index 4a1d4bec0..9248eec5d 100644 --- a/kio/kfile/tests/kurlrequestertest.cpp +++ b/kio/kfile/tests/kurlrequestertest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) qDebug( "Selected url: %s", url.url().latin1()); KURLRequester *req = new KURLRequester(); - KEditListBox *el = new KEditListBox( TQString::tqfromLatin1("Test"), req->customEditor() ); + KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() ); el->show(); return app.exec(); } diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp index b2449f79f..6f0592ac4 100644 --- a/kio/kio/authinfo.cpp +++ b/kio/kio/authinfo.cpp @@ -158,7 +158,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc, AutoLogin &log = *it; if ( (mode & defaultOnly) == defaultOnly && - log.machine == TQString::tqfromLatin1("default") && + log.machine == TQString::fromLatin1("default") && (login.login.isEmpty() || login.login == log.login) ) { login.type = log.type; @@ -169,7 +169,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc, } if ( (mode & presetOnly) == presetOnly && - log.machine == TQString::tqfromLatin1("preset") && + log.machine == TQString::fromLatin1("preset") && (login.login.isEmpty() || login.login == log.login) ) { login.type = log.type; @@ -237,7 +237,7 @@ TQString NetRC::extract( const char* buf, const char* key, int& pos ) if ( idx > start ) { pos = idx; - return TQString::tqfromLatin1( buf+start, idx-start); + return TQString::fromLatin1( buf+start, idx-start); } } } @@ -280,7 +280,7 @@ bool NetRC::parse( int fd ) while( buf[tail-1] == '\n' || buf[tail-1] =='\r' ) tail--; - TQString mac = TQString::tqfromLatin1(buf, tail).stripWhiteSpace(); + TQString mac = TQString::fromLatin1(buf, tail).stripWhiteSpace(); if ( !mac.isEmpty() ) loginMap[type][index].macdef[macro].append( mac ); @@ -294,12 +294,12 @@ bool NetRC::parse( int fd ) if (strncasecmp(buf+pos, "default", 7) == 0 ) { pos += 7; - l.machine = TQString::tqfromLatin1("default"); + l.machine = TQString::fromLatin1("default"); } else if (strncasecmp(buf+pos, "preset", 6) == 0 ) { pos += 6; - l.machine = TQString::tqfromLatin1("preset"); + l.machine = TQString::fromLatin1("preset"); } } // kdDebug() << "Machine: " << l.machine << endl; @@ -314,7 +314,7 @@ bool NetRC::parse( int fd ) type = l.type = extract( buf, "type", pos ); if ( l.type.isEmpty() && !l.machine.isEmpty() ) - type = l.type = TQString::tqfromLatin1("ftp"); + type = l.type = TQString::fromLatin1("ftp"); // kdDebug() << "Type: " << l.type << endl; macro = extract( buf, "macdef", pos ); diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp index 56c24b072..e1d343c10 100644 --- a/kio/kio/chmodjob.cpp +++ b/kio/kio/chmodjob.cpp @@ -121,7 +121,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list ) break; } } - if ( !isLink && relativePath != TQString::tqfromLatin1("..") ) + if ( !isLink && relativePath != TQString::fromLatin1("..") ) { ChmodInfo info; info.url = m_lstItems.first()->url(); // base directory diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp index 35bed5235..d3ef79ff3 100644 --- a/kio/kio/dataprotocol.cpp +++ b/kio/kio/dataprotocol.cpp @@ -186,7 +186,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) { header_info.is_base64 = false; // decode url and save it - TQString &raw_url = header_info.url = TQString::tqfromLatin1("data:") + url.path(); + TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path(); int raw_url_len = (int)raw_url.length(); // jump over scheme part (must be "data:", we don't even check that) diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp index 8ec90b2a7..d16ecc0d4 100644 --- a/kio/kio/dataslave.cpp +++ b/kio/kio/dataslave.cpp @@ -137,7 +137,7 @@ void DataSlave::send(int cmd, const TQByteArray &arr) { break; default: error(ERR_UNSUPPORTED_ACTION, - unsupportedActionErrorString(TQString::tqfromLatin1("data"),cmd)); + unsupportedActionErrorString(TQString::fromLatin1("data"),cmd)); }/*end switch*/ } diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp index 9c0ae5e81..f99219524 100644 --- a/kio/kio/global.cpp +++ b/kio/kio/global.cpp @@ -97,7 +97,7 @@ KIO_EXPORT TQString KIO::number( KIO::filesize_t size ) { char charbuf[256]; sprintf(charbuf, "%lld", size); - return TQString::tqfromLatin1(charbuf); + return TQString::fromLatin1(charbuf); } KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize, @@ -284,7 +284,7 @@ KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorTe result = i18n( "Could not create socket for accessing %1." ).arg( errorText ); break; case KIO::ERR_COULD_NOT_CONNECT: - result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::tqfromLatin1("localhost") : errorText ); + result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText ); break; case KIO::ERR_CONNECTION_BROKEN: result = i18n( "Connection to host %1 is broken." ).arg( errorText ); @@ -477,16 +477,16 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0 url = i18n( "(unknown)" ); } - datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), + datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false ); ret << errorName; - ret << TQString::tqfromLatin1( "<qt><p><b>" ) + errorName + - TQString::tqfromLatin1( "</b></p><p>" ) + description + - TQString::tqfromLatin1( "</p>" ); - ret2 = TQString::tqfromLatin1( "<qt><p>" ); + ret << TQString::fromLatin1( "<qt><p><b>" ) + errorName + + TQString::fromLatin1( "</b></p><p>" ) + description + + TQString::fromLatin1( "</p>" ); + ret2 = TQString::fromLatin1( "<qt><p>" ); if ( !techName.isEmpty() ) - ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::tqfromLatin1( "</p>" ); + ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::fromLatin1( "</p>" ); ret2 += i18n( "</p><p><b>Details of the request</b>:" ); ret2 += i18n( "</p><ul><li>URL: %1</li>" ).arg( url ); if ( !protocol.isEmpty() ) { @@ -497,12 +497,12 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0 if ( !causes.isEmpty() ) { ret2 += i18n( "<p><b>Possible causes</b>:</p><ul><li>" ); ret2 += causes.join( "</li><li>" ); - ret2 += TQString::tqfromLatin1( "</li></ul>" ); + ret2 += TQString::fromLatin1( "</li></ul>" ); } if ( !solutions.isEmpty() ) { ret2 += i18n( "<p><b>Possible solutions</b>:</p><ul><li>" ); ret2 += solutions.join( "</li><li>" ); - ret2 += TQString::tqfromLatin1( "</li></ul>" ); + ret2 += TQString::fromLatin1( "</li></ul>" ); } ret << ret2; return ret; @@ -559,7 +559,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT protocol = i18n( "(unknown)" ); } - datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), + datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false ); TQString errorName, techName, description; @@ -1738,7 +1738,7 @@ static TQString get_mount_info(const TQString& filename, if ( is_my_mountpoint( mounted[i].f_mntonname, realname, max ) ) { mountPoint = TQFile::decodeName(mounted[i].f_mntonname); - fstype = TQString::tqfromLatin1(mounttype); + fstype = TQString::fromLatin1(mounttype); check_mount_point( mounttype, mounted[i].f_mntfromname, isautofs, isslow ); // keep going, looking for a potentially better one @@ -1805,7 +1805,7 @@ static TQString get_mount_info(const TQString& filename, if ( is_my_mountpoint( mountedto, realname, max ) ) { mountPoint = TQFile::decodeName(mountedto); - fstype = TQString::tqfromLatin1(ent->vfsent_name); + fstype = TQString::fromLatin1(ent->vfsent_name); check_mount_point(ent->vfsent_name, device_name, isautofs, isslow); if (ismanual == Unseen) diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp index 411604aba..beb5287e6 100644 --- a/kio/kio/job.cpp +++ b/kio/kio/job.cpp @@ -792,7 +792,7 @@ SimpleJob *KIO::special(const KURL& url, const TQByteArray & data, bool showProg SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo ) { KIO_ARGS << int(1) << TQ_INT8( ro ? 1 : 0 ) - << TQString::tqfromLatin1(fstype) << dev << point; + << TQString::fromLatin1(fstype) << dev << point; SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo ); if ( showProgressInfo ) Observer::self()->mounting( job, dev, point ); @@ -1480,7 +1480,7 @@ void MimetypeJob::slotFinished( ) // Due to the "protocol doesn't support listing" code in KRun, we // assumed it was a file. kdDebug(7007) << "It is in fact a directory!" << endl; - m_mimetype = TQString::tqfromLatin1("inode/directory"); + m_mimetype = TQString::fromLatin1("inode/directory"); emit TransferJob::mimetype( this, m_mimetype ); m_error = 0; } @@ -3359,7 +3359,7 @@ void CopyJob::copyNextFile() bool devicesOk=false; // if the source is a devices url, handle it a littlebit special - if ((*it).uSource.protocol()==TQString::tqfromLatin1("devices")) + if ((*it).uSource.protocol()==TQString::fromLatin1("devices")) { TQByteArray data; TQByteArray param; @@ -3395,20 +3395,20 @@ void CopyJob::copyNextFile() config.setDesktopGroup(); KURL url = (*it).uSource; url.setPass( "" ); - config.writePathEntry( TQString::tqfromLatin1("URL"), url.url() ); - config.writeEntry( TQString::tqfromLatin1("Name"), url.url() ); - config.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") ); + config.writePathEntry( TQString::fromLatin1("URL"), url.url() ); + config.writeEntry( TQString::fromLatin1("Name"), url.url() ); + config.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); TQString protocol = (*it).uSource.protocol(); - if ( protocol == TQString::tqfromLatin1("ftp") ) - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("ftp") ); - else if ( protocol == TQString::tqfromLatin1("http") ) - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("www") ); - else if ( protocol == TQString::tqfromLatin1("info") ) - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("info") ); - else if ( protocol == TQString::tqfromLatin1("mailto") ) // sven: - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("kmail") ); // added mailto: support + if ( protocol == TQString::fromLatin1("ftp") ) + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("ftp") ); + else if ( protocol == TQString::fromLatin1("http") ) + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("www") ); + else if ( protocol == TQString::fromLatin1("info") ) + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("info") ); + else if ( protocol == TQString::fromLatin1("mailto") ) // sven: + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("kmail") ); // added mailto: support else - config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("unknown") ); + config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("unknown") ); config.sync(); files.remove( it ); m_processedFiles++; @@ -4651,7 +4651,7 @@ TQFile *CacheInfo::cachedFile() ok = false; time_t date; - time_t tqcurrentDate = time(0); + time_t currentDate = time(0); // URL if (ok && (!fgets(buffer, 400, fs))) @@ -4673,10 +4673,10 @@ TQFile *CacheInfo::cachedFile() if (ok) { date = (time_t) strtoul(buffer, 0, 10); - if (m_maxCacheAge && (difftime(tqcurrentDate, date) > m_maxCacheAge)) + if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge)) { m_bMustRevalidate = true; - m_expireDate = tqcurrentDate; + m_expireDate = currentDate; } } @@ -4690,7 +4690,7 @@ TQFile *CacheInfo::cachedFile() { date = (time_t) strtoul(buffer, 0, 10); // After the expire date we need to revalidate. - if (!date || difftime(tqcurrentDate, date) >= 0) + if (!date || difftime(currentDate, date) >= 0) m_bMustRevalidate = true; m_expireDate = date; } diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp index d05098102..432a50d31 100644 --- a/kio/kio/kacl.cpp +++ b/kio/kio/kacl.cpp @@ -623,8 +623,8 @@ TQString KACL::KACLPrivate::getUserName( uid_t uid ) const if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - m_usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) ); - return TQString::tqfromLatin1( user->pw_name ); + m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); + return TQString::fromLatin1( user->pw_name ); } else return TQString::number( uid ); @@ -641,8 +641,8 @@ TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - m_groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) ); - return TQString::tqfromLatin1( grp->gr_name ); + m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); + return TQString::fromLatin1( grp->gr_name ); } else return TQString::number( gid ); @@ -654,7 +654,7 @@ TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const static TQString aclAsString(const acl_t acl) { char *aclString = acl_to_text( acl, 0 ); - TQString ret = TQString::tqfromLatin1( aclString ); + TQString ret = TQString::fromLatin1( aclString ); acl_free( (void*)aclString ); return ret; } diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp index c5b9cad66..732269523 100644 --- a/kio/kio/karchive.cpp +++ b/kio/kio/karchive.cpp @@ -375,7 +375,7 @@ KArchiveDirectory * KArchive::rootDir() TQString username = pw ? TQFile::decodeName(pw->pw_name) : TQString::number( getuid() ); TQString groupname = grp ? TQFile::decodeName(grp->gr_name) : TQString::number( getgid() ); - d->rootDir = new KArchiveDirectory( this, TQString::tqfromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null ); + d->rootDir = new KArchiveDirectory( this, TQString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null ); } return d->rootDir; } diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp index 798a37d95..c5e04537e 100644 --- a/kio/kio/kdatatool.cpp +++ b/kio/kio/kdatatool.cpp @@ -167,11 +167,11 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const if ( !datatype.isEmpty() ) { - constr = TQString::tqfromLatin1( "DataType == '%1'" ).arg( datatype ); + constr = TQString::fromLatin1( "DataType == '%1'" ).arg( datatype ); } if ( !mimetype.isEmpty() ) { - TQString tmp = TQString::tqfromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype ); + TQString tmp = TQString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype ); if ( constr.isEmpty() ) constr = tmp; else @@ -180,7 +180,7 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const /* Bug in KTrader ? Test with HEAD-tdelibs! if ( instance ) { - TQString tmp = TQString::tqfromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() ); + TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() ); if ( constr.isEmpty() ) constr = tmp; else diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp index 363ab2752..010832573 100644 --- a/kio/kio/kfileitem.cpp +++ b/kio/kio/kfileitem.cpp @@ -1041,7 +1041,7 @@ TQString KFileItem::parsePermissions(mode_t perm) const if (hasExtendedACL()) p[10]='+'; - return TQString::tqfromLatin1(p); + return TQString::fromLatin1(p); } // check if we need to cache this diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp index 3c85363c4..dcf735619 100644 --- a/kio/kio/kfilemetainfo.cpp +++ b/kio/kio/kfilemetainfo.cpp @@ -937,7 +937,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const query = "(not exist [X-KDE-Protocol])"; queryMimeType = mimeType; } else { - query = TQString::tqfromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol); + query = TQString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol); // querying for a protocol: we have no mimetype, so we need to use KFilePlugin as one queryMimeType = "KFilePlugin"; // hopefully using KFilePlugin as genericMimeType too isn't a problem diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp index 62b5e6ddb..1f6dca285 100644 --- a/kio/kio/kfileshare.cpp +++ b/kio/kio/kfileshare.cpp @@ -90,7 +90,7 @@ void KFileShare::readConfig() // static { // Create KFileSharePrivate instance KFileSharePrivate::self(); - KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes"; s_restricted = config.readEntry("RESTRICT", "yes") == "yes"; @@ -241,7 +241,7 @@ KFileShare::Authorization KFileShare::authorization() TQString KFileShare::findExe( const char* exeName ) { // /usr/sbin on Mandrake, $PATH allows flexibility for other distributions - TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::tqfromLatin1(":/usr/sbin"); + TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin"); TQString exe = KStandardDirs::findExe( exeName, path ); if (exe.isEmpty()) kdError() << exeName << " not found in " << path << endl; diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp index 72cc13f1f..7260f9e18 100644 --- a/kio/kio/kimageio.cpp +++ b/kio/kio/kimageio.cpp @@ -100,18 +100,18 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) { if (mLib.isEmpty()) { - iio->setqStatus(1); // Error + iio->seStatus(1); // Error return; } TQString libpath = KLibLoader::findLibrary(mLib.ascii()); if ( libpath.isEmpty()) { - iio->setqStatus(1); // Error + iio->seStatus(1); // Error return; } lt_dlhandle libhandle = lt_dlopen( TQFile::encodeName(libpath) ); if (libhandle == 0) { - iio->setqStatus(1); // error + iio->seStatus(1); // error kdWarning() << "KImageIOFormat::callLibFunc: couldn't dlopen " << mLib << "(" << lt_dlerror() << ")" << endl; return; } @@ -123,7 +123,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) lt_ptr func = lt_dlsym(libhandle, funcName.ascii()); if (func == NULL) { - iio->setqStatus(1); // error + iio->seStatus(1); // error kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl; } mReadFunc = (void (*)(TQImageIO *))func; @@ -134,7 +134,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) lt_ptr func = lt_dlsym(libhandle, funcName.ascii()); if (func == NULL) { - iio->setqStatus(1); // error + iio->seStatus(1); // error kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl; } mWriteFunc = (void (*)(TQImageIO *))func; @@ -145,12 +145,12 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) if (mReadFunc) mReadFunc(iio); else - iio->setqStatus(1); // Error + iio->seStatus(1); // Error else if (mWriteFunc) mWriteFunc(iio); else - iio->setqStatus(1); // Error + iio->seStatus(1); // Error } @@ -232,7 +232,7 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode) patterns.sort(); patterns.prepend(allPatterns); - TQString pattern = patterns.join(TQString::tqfromLatin1("\n")); + TQString pattern = patterns.join(TQString::fromLatin1("\n")); return pattern; } @@ -256,7 +256,7 @@ KImageIOFactory::readImage( TQImageIO *iio) } if (!format || !format->bRead) { - iio->setqStatus(1); // error + iio->seStatus(1); // error return; } @@ -283,7 +283,7 @@ KImageIOFactory::writeImage( TQImageIO *iio) } if (!format || !format->bWrite) { - iio->setqStatus(1); // error + iio->seStatus(1); // error return; } diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp index 09615d9a7..72b249249 100644 --- a/kio/kio/kmimemagic.cpp +++ b/kio/kio/kmimemagic.cpp @@ -525,7 +525,7 @@ class KMimeMagicUtimeConf public: KMimeMagicUtimeConf() { - tmpDirs << TQString::tqfromLatin1("/tmp"); // default value + tmpDirs << TQString::fromLatin1("/tmp"); // default value // The trick is that we also don't want the user to override globally set // directories. So we have to misuse KStandardDirs :} diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp index 719107223..5d650b4b2 100644 --- a/kio/kio/kmimetype.cpp +++ b/kio/kio/kmimetype.cpp @@ -265,7 +265,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, { // Assume inode/directory, if the protocol supports listing. if ( KProtocolInfo::supportsListing( _url ) ) - return mimeType( TQString::tqfromLatin1("inode/directory") ); + return mimeType( TQString::fromLatin1("inode/directory") ); else return defaultMimeTypePtr(); // == 'no idea', e.g. for "data:,foo/" } @@ -382,15 +382,15 @@ void KMimeType::init( KDesktopFile * config ) m_lstPatterns = config->readListEntry( "Patterns", ';' ); // Read the X-KDE-AutoEmbed setting and store it in the properties map - TQString XKDEAutoEmbed = TQString::tqfromLatin1("X-KDE-AutoEmbed"); + TQString XKDEAutoEmbed = TQString::fromLatin1("X-KDE-AutoEmbed"); if ( config->hasKey( XKDEAutoEmbed ) ) m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) ); - TQString XKDEText = TQString::tqfromLatin1("X-KDE-text"); + TQString XKDEText = TQString::fromLatin1("X-KDE-text"); if ( config->hasKey( XKDEText ) ) m_mapProps.insert( XKDEText, config->readBoolEntry( XKDEText ) ); - TQString XKDEIsAlso = TQString::tqfromLatin1("X-KDE-IsAlso"); + TQString XKDEIsAlso = TQString::fromLatin1("X-KDE-IsAlso"); if ( config->hasKey( XKDEIsAlso ) ) { TQString inherits = config->readEntry( XKDEIsAlso ); if ( inherits != name() ) @@ -399,7 +399,7 @@ void KMimeType::init( KDesktopFile * config ) kdWarning(7009) << "Error: " << inherits << " inherits from itself!!!!" << endl; } - TQString XKDEPatternsAccuracy = TQString::tqfromLatin1("X-KDE-PatternsAccuracy"); + TQString XKDEPatternsAccuracy = TQString::fromLatin1("X-KDE-PatternsAccuracy"); if ( config->hasKey( XKDEPatternsAccuracy ) ) m_mapProps.insert( XKDEPatternsAccuracy, config->readEntry( XKDEPatternsAccuracy ) ); @@ -838,7 +838,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf KURL mpURL; mpURL.setPath( mp ); // Open a new window - retval = KRun::runURL( mpURL, TQString::tqfromLatin1("inode/directory") ); + retval = KRun::runURL( mpURL, TQString::fromLatin1("inode/directory") ); } else { diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp index d4d7b620a..5548396b6 100644 --- a/kio/kio/kmimetypechooser.cpp +++ b/kio/kio/kmimetypechooser.cpp @@ -195,9 +195,9 @@ void KMimeTypeChooser::editMimeType() // thanks to libkonq/konq_operations.cc connect( KSycoca::self(), TQT_SIGNAL(databaseChanged()), this, TQT_SLOT(slotSycocaDatabaseChanged()) ); - TQString keditfiletype = TQString::tqfromLatin1("keditfiletype"); + TQString keditfiletype = TQString::fromLatin1("keditfiletype"); KRun::runCommand( keditfiletype - + " --parent " + TQString::number( (ulong)tqtopLevelWidget()->winId()) + + " --parent " + TQString::number( (ulong)topLevelWidget()->winId()) + " " + KProcess::quote(mt), keditfiletype, keditfiletype /*unused*/); } diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp index 9d24886da..a3d8e0302 100644 --- a/kio/kio/kprotocolmanager.cpp +++ b/kio/kio/kprotocolmanager.cpp @@ -277,7 +277,7 @@ TQString KProtocolManager::proxyForURL( const KURL &url ) break; } - return (proxy.isEmpty() ? TQString::tqfromLatin1("DIRECT") : proxy); + return (proxy.isEmpty() ? TQString::fromLatin1("DIRECT") : proxy); } void KProtocolManager::badProxy( const TQString &proxy ) @@ -462,7 +462,7 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) if( modifiers.contains('p') ) { // TODO: determine this value instead of hardcoding it... - supp += TQString::tqfromLatin1("; X11"); + supp += TQString::fromLatin1("; X11"); } if( modifiers.contains('m') ) { @@ -471,13 +471,13 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) if( modifiers.contains('l') ) { TQStringList languageList = KGlobal::locale()->languageList(); - TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") ); if( it != languageList.end() ) { - if( languageList.contains( TQString::tqfromLatin1("en") ) > 0 ) + if( languageList.contains( TQString::fromLatin1("en") ) > 0 ) languageList.remove( it ); else - (*it) = TQString::tqfromLatin1("en"); + (*it) = TQString::fromLatin1("en"); } if( languageList.count() ) supp += TQString("; %1").arg(languageList.join(", ")); diff --git a/kio/kio/kremoteencoding.cpp b/kio/kio/kremoteencoding.cpp index 23fd0563d..632eeb8b2 100644 --- a/kio/kio/kremoteencoding.cpp +++ b/kio/kio/kremoteencoding.cpp @@ -37,13 +37,13 @@ TQString KRemoteEncoding::decode(const TQCString& name) const { #ifdef CHECK_UTF8 if (codec->mibEnum() == 106 && !KStringHandler::isUtf8(name)) - return TQString::tqfromLatin1(name); + return TQString::fromLatin1(name); #endif TQString result = codec->toUnicode(name); if (codec->fromUnicode(result) != name) // fallback in case of decoding failure - return TQString::tqfromLatin1(name); + return TQString::fromLatin1(name); return result; } diff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp index 08da8352c..defeae4a7 100644 --- a/kio/kio/ksambashare.cpp +++ b/kio/kio/ksambashare.cpp @@ -62,7 +62,7 @@ bool KSambaSharePrivate::load() { * @return wether a smb.conf was found. **/ bool KSambaSharePrivate::findSmbConf() { - KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); smbConf = config.readEntry("SMBCONF"); if ( TQFile::exists(smbConf) ) diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp index ab65e0c66..2c4c5b12e 100644 --- a/kio/kio/kurifilter.cpp +++ b/kio/kio/kurifilter.cpp @@ -35,7 +35,7 @@ template class TQPtrList<KURIFilterPlugin>; KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri ) :TQObject( parent, name ) { - m_strName = TQString::tqfromLatin1( name ); + m_strName = TQString::fromLatin1( name ); m_dblPriority = pri; } @@ -173,30 +173,30 @@ TQString KURIFilterData::iconName() TQString exeName = m_pURI.url(); exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given KService::Ptr service = KService::serviceByDesktopName( exeName ); - if (service && service->icon() != TQString::tqfromLatin1( "unknown" )) + if (service && service->icon() != TQString::fromLatin1( "unknown" )) m_strIconName = service->icon(); // Try to find an icon with the same name as the binary (useful for non-kde apps) else if ( !KGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() ) m_strIconName = exeName; else // not found, use default - m_strIconName = TQString::tqfromLatin1("exec"); + m_strIconName = TQString::fromLatin1("exec"); break; } case KURIFilterData::HELP: { - m_strIconName = TQString::tqfromLatin1("khelpcenter"); + m_strIconName = TQString::fromLatin1("khelpcenter"); break; } case KURIFilterData::SHELL: { - m_strIconName = TQString::tqfromLatin1("konsole"); + m_strIconName = TQString::fromLatin1("konsole"); break; } case KURIFilterData::ERROR: case KURIFilterData::BLOCKED: { - m_strIconName = TQString::tqfromLatin1("error"); + m_strIconName = TQString::fromLatin1("error"); break; } default: diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index 795f9a8b1..e6c3d655b 100644 --- a/kio/kio/netaccess.cpp +++ b/kio/kio/netaccess.cpp @@ -373,7 +373,7 @@ bool NetAccess::mkdirInternal( const KURL & url, int permissions, TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window ) { bJobOK = true; // success unless further error occurs - m_mimetype = TQString::tqfromLatin1("unknown"); + m_mimetype = TQString::fromLatin1("unknown"); KIO::Job * job = KIO::mimetype( url ); job->setWindow (window); connect( job, TQT_SIGNAL( result (KIO::Job *) ), @@ -462,7 +462,7 @@ bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* connect( job, TQT_SIGNAL( result (KIO::Job *) ), this, TQT_SLOT( slotResult (KIO::Job *) ) ); - TQMetaObject *meta = job->tqmetaObject(); + TQMetaObject *meta = job->metaObject(); static const char dataSignal[] = "data(KIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)"; if ( meta->findSignal( dataSignal ) != -1 ) { diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp index a71f7881f..e18666328 100644 --- a/kio/kio/passdlg.cpp +++ b/kio/kio/passdlg.cpp @@ -198,7 +198,7 @@ static void calculateLabelSize(TQLabel *label) // Calculate a proper size for the text. { TQSimpleRichText rt(qt_text, label->font()); - TQRect d = KGlobalSettings::desktopGeometry(label->tqtopLevelWidget()); + TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget()); pref_width = d.width() / 4; rt.setWidth(pref_width-10); diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index 0fc13b4b2..3b428c847 100644 --- a/kio/kio/previewjob.cpp +++ b/kio/kio/previewjob.cpp @@ -96,7 +96,7 @@ struct KIO::PreviewJobPrivate // If the file to create a thumb for was a temp file, this is its name TQString tempName; // Over that, it's too much - unsigned long tqmaximumSize; + unsigned long maximumSize; // the size for the icon overlay int iconSize; // the transparency of the blended mimetype icon @@ -246,7 +246,7 @@ void PreviewJob::startPreview() // Read configuration value for the maximum allowed size KConfig * config = KGlobal::config(); KConfigGroupSaver cgs( config, "PreviewSettings" ); - d->tqmaximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ ); + d->maximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ ); if (bNeedCache) { @@ -339,7 +339,7 @@ void PreviewJob::slotResult( KIO::Job *job ) } else if ( (*it).m_uds == KIO::UDS_SIZE ) { - if ( filesize_t((*it).m_long) > d->tqmaximumSize && + if ( filesize_t((*it).m_long) > d->maximumSize && !d->ignoreMaximumSize && !d->currentItem.plugin->property("IgnoreMaximumSize").toBool() ) { diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp index 937d6aa51..8619c2dc4 100644 --- a/kio/kio/sessiondata.cpp +++ b/kio/kio/sessiondata.cpp @@ -273,7 +273,7 @@ void SessionData::reset() // Get language settings... TQStringList languageList = KGlobal::locale()->languagesTwoAlpha(); - TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") ); if ( it != languageList.end() ) { if ( languageList.contains( english ) > 0 ) @@ -286,7 +286,7 @@ void SessionData::reset() d->language = languageList.join( ", " ); - d->charsets = TQString::tqfromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower(); + d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower(); KProtocolManager::reparseConfiguration(); } diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp index b4f288d94..4826c8da8 100644 --- a/kio/kio/slave.cpp +++ b/kio/kio/slave.cpp @@ -364,7 +364,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error client->attach(); TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName()); - KTempFile socketfile(prefix, TQString::tqfromLatin1(".slave-socket")); + KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket")); if ( socketfile.status() != 0 ) { error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno)); @@ -469,7 +469,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url ) client->attach(); TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName()); - KTempFile socketfile(prefix, TQString::tqfromLatin1(".slave-socket")); + KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket")); if ( socketfile.status() != 0 ) return 0; diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h index 48fccd74e..82370ce56 100644 --- a/kio/kio/slavebase.h +++ b/kio/kio/slavebase.h @@ -618,10 +618,10 @@ public: * KIO::AuthInfo authInfo; * if ( openPassDlg( authInfo ) ) * { - * kdDebug() << TQString::tqfromLatin1("User: ") + * kdDebug() << TQString::fromLatin1("User: ") * << authInfo.username << endl; - * kdDebug() << TQString::tqfromLatin1("Password: ") - * << TQString::tqfromLatin1("Not displayed here!") << endl; + * kdDebug() << TQString::fromLatin1("Password: ") + * << TQString::fromLatin1("Not displayed here!") << endl; * } * \endcode * @@ -635,10 +635,10 @@ public: * TQString errorMsg = "You entered an incorrect password."; * if ( openPassDlg( authInfo, errorMsg ) ) * { - * kdDebug() << TQString::tqfromLatin1("User: ") + * kdDebug() << TQString::fromLatin1("User: ") * << authInfo.username << endl; - * kdDebug() << TQString::tqfromLatin1("Password: ") - * << TQString::tqfromLatin1("Not displayed here!") << endl; + * kdDebug() << TQString::fromLatin1("Password: ") + * << TQString::fromLatin1("Not displayed here!") << endl; * } * \endcode * diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp index 06694dd72..42cbad3a4 100644 --- a/kio/kpasswdserver/kpasswdserver.cpp +++ b/kio/kpasswdserver/kpasswdserver.cpp @@ -94,7 +94,7 @@ static TQString makeWalletKey( const TQString& key, const TQString& realm ) // Helper for storeInWallet/readFromWallet static TQString makeMapKey( const char* key, int entryNumber ) { - TQString str = TQString::tqfromLatin1( key ); + TQString str = TQString::fromLatin1( key ); if ( entryNumber > 1 ) str += "-" + TQString::number( entryNumber ); return str; diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc index 7211e510f..7d86726c8 100644 --- a/kio/kssl/ksslcertificate.cc +++ b/kio/kssl/ksslcertificate.cc @@ -871,7 +871,7 @@ TQDateTime KSSLCertificate::getQDTNotBefore() const { #ifdef KSSL_HAVE_SSL return ASN1_UTCTIME_QDateTime(X509_get_notBefore(d->m_cert), NULL); #else -return TQDateTime::tqcurrentDateTime(); +return TQDateTime::currentDateTime(); #endif } @@ -880,7 +880,7 @@ TQDateTime KSSLCertificate::getQDTNotAfter() const { #ifdef KSSL_HAVE_SSL return ASN1_UTCTIME_QDateTime(X509_get_notAfter(d->m_cert), NULL); #else -return TQDateTime::tqcurrentDateTime(); +return TQDateTime::currentDateTime(); #endif } diff --git a/kio/kssl/ksslinfodlg.cc b/kio/kssl/ksslinfodlg.cc index 32580e932..9a43942c8 100644 --- a/kio/kssl/ksslinfodlg.cc +++ b/kio/kssl/ksslinfodlg.cc @@ -273,14 +273,14 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) { d->_serialNum->setText(x->getSerialNumber()); cspl = d->_validFrom->palette(); - if (x->getQDTNotBefore() > TQDateTime::tqcurrentDateTime(Qt::UTC)) + if (x->getQDTNotBefore() > TQDateTime::currentDateTime(Qt::UTC)) cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); d->_validFrom->setPalette(cspl); d->_validFrom->setText(x->getNotBefore()); cspl = d->_validUntil->palette(); - if (x->getQDTNotAfter() < TQDateTime::tqcurrentDateTime(Qt::UTC)) + if (x->getQDTNotAfter() < TQDateTime::currentDateTime(Qt::UTC)) cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21)); else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59)); d->_validUntil->setPalette(cspl); @@ -305,8 +305,8 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) { ksv = ksvl.first(); if (ksv == KSSLCertificate::SelfSigned) { - if (x->getQDTNotAfter() > TQDateTime::tqcurrentDateTime(Qt::UTC) && - x->getQDTNotBefore() < TQDateTime::tqcurrentDateTime(Qt::UTC)) { + if (x->getQDTNotAfter() > TQDateTime::currentDateTime(Qt::UTC) && + x->getQDTNotBefore() < TQDateTime::currentDateTime(Qt::UTC)) { if (KSSLSigners().useForSSL(*x)) ksv = KSSLCertificate::Ok; } else { diff --git a/kio/kssl/ksslpeerinfo.cc b/kio/kssl/ksslpeerinfo.cc index 8d960ceb7..d1c2d00fc 100644 --- a/kio/kssl/ksslpeerinfo.cc +++ b/kio/kssl/ksslpeerinfo.cc @@ -65,7 +65,7 @@ void KSSLPeerInfo::setPeerHost(TQString realHost) { #ifdef Q_WS_WIN //TODO kresolver not ported d->peerHost = d->peerHost.lower(); #else - d->peerHost = TQString::tqfromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost)); + d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost)); #endif } diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp index db2b45b6c..834d2e30d 100644 --- a/kio/misc/kntlm/kntlm.cpp +++ b/kio/misc/kntlm/kntlm.cpp @@ -48,7 +48,7 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tq if ( tqunicode ) { str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); } else { - str = TQString::tqfromLatin1( c, len ); + str = TQString::fromLatin1( c, len ); } return str; } @@ -299,7 +299,7 @@ TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo ) Blob *bl = (Blob *) blob.data(); bl->signature = KFromToBigEndian( (TQ_UINT32) 0x01010000 ); - TQ_UINT64 now = TQDateTime::tqcurrentDateTime().toTime_t(); + TQ_UINT64 now = TQDateTime::currentDateTime().toTime_t(); now += (TQ_UINT64)3600*(TQ_UINT64)24*(TQ_UINT64)134774; now *= (TQ_UINT64)10000000; bl->timestamp = KFromToLittleEndian( now ); diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp index 46475e9aa..764ed1a74 100644 --- a/kio/misc/ksendbugmail/main.cpp +++ b/kio/misc/ksendbugmail/main.cpp @@ -101,11 +101,11 @@ int main(int argc, char **argv) { if (!fromaddr.isEmpty()) { TQString name = emailConfig.getSetting(KEMailSettings::RealName); if (!name.isEmpty()) - fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">"); + fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); } else { struct passwd *p; p = getpwuid(getuid()); - fromaddr = TQString::tqfromLatin1(p->pw_name); + fromaddr = TQString::fromLatin1(p->pw_name); fromaddr += "@"; char buffer[256]; buffer[0] = '\0'; @@ -117,7 +117,7 @@ int main(int argc, char **argv) { TQString server = emailConfig.getSetting(KEMailSettings::OutServer); if (server.isEmpty()) - server=TQString::tqfromLatin1("bugs.kde.org"); + server=TQString::fromLatin1("bugs.kde.org"); SMTP *sm = new SMTP; BugMailer bm(sm); @@ -129,7 +129,7 @@ int main(int argc, char **argv) { sm->setSenderAddress(fromaddr); sm->setRecipientAddress(recipient); sm->setMessageSubject(subject); - sm->setMessageHeader(TQString::tqfromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data())); + sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data())); sm->setMessageBody(text); sm->sendMessage(); diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp index a9f69792d..36a417b88 100644 --- a/kio/misc/ksendbugmail/smtp.cpp +++ b/kio/misc/ksendbugmail/smtp.cpp @@ -134,7 +134,7 @@ void SMTP::sendMessage(void) kdDebug() << "state was == FINISHED\n" << endl; finished = false; state = IN; - writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); write(sock->socket(), writeString.ascii(), writeString.length()); } if(connected){ @@ -262,7 +262,7 @@ void SMTP::processLine(TQString *line) switch(stat){ case GREET: //220 state = IN; - writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; @@ -273,19 +273,19 @@ void SMTP::processLine(TQString *line) switch(state){ case IN: state = READY; - writeString = TQString::tqfromLatin1("mail from: %1\r\n").arg(senderAddress); + writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; case READY: state = SENTFROM; - writeString = TQString::tqfromLatin1("rcpt to: %1\r\n").arg(recipientAddress); + writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; case SENTFROM: state = SENTTO; - writeString = TQString::tqfromLatin1("data\r\n"); + writeString = TQString::fromLatin1("data\r\n"); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; @@ -305,11 +305,11 @@ void SMTP::processLine(TQString *line) break; case READYDATA: //354 state = DATA; - writeString = TQString::tqfromLatin1("Subject: %1\r\n").arg(messageSubject); + writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject); writeString += messageHeader; writeString += "\r\n"; writeString += messageBody; - writeString += TQString::tqfromLatin1(".\r\n"); + writeString += TQString::fromLatin1(".\r\n"); kdDebug() << "out: " << writeString; write(sock->socket(), writeString.ascii(), writeString.length()); break; diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp index 45d523d2e..b60d75226 100644 --- a/kio/misc/kssld/kssld.cpp +++ b/kio/misc/kssld/kssld.cpp @@ -72,7 +72,7 @@ static void updatePoliciesConfig(KConfig *cfg) { cfg->setGroup(*i); // remove it if it has expired - if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::tqcurrentDateTime()) { + if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::currentDateTime()) { cfg->deleteGroup(*i); continue; } @@ -164,7 +164,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (node->permanent || - node->expires > TQDateTime::tqcurrentDateTime()) { + node->expires > TQDateTime::currentDateTime()) { // First convert to a binary format and then write the // kconfig entry write the (CN, policy, cert) to // KSimpleConfig @@ -239,7 +239,7 @@ TQStringList groups = cfg->groupList(); // remove it if it has expired if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { cfg->deleteGroup(*i); continue; } @@ -278,7 +278,7 @@ KSSLCNode *node; node->permanent = permanent; if (!permanent) { - node->expires = TQDateTime::tqcurrentDateTime(); + node->expires = TQDateTime::currentDateTime(); // FIXME: make this configurable node->expires = TQT_TQDATETIME_OBJECT(node->expires.addSecs(3600)); } @@ -297,7 +297,7 @@ KSSLCNode *node; certList.prepend(n); if (!permanent) { - n->expires = TQDateTime::tqcurrentDateTime(); + n->expires = TQDateTime::currentDateTime(); n->expires = TQT_TQDATETIME_OBJECT(n->expires.addSecs(3600)); } @@ -312,7 +312,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -338,7 +338,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -362,7 +362,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -386,7 +386,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && - node->expires < TQDateTime::tqcurrentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -410,7 +410,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -535,7 +535,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -563,7 +563,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -593,7 +593,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - TQDateTime::tqcurrentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp index 87f95fb29..32130c159 100644 --- a/kio/misc/uiserver.cpp +++ b/kio/misc/uiserver.cpp @@ -418,7 +418,7 @@ void ProgressItem::slotToggleDefaultProgress() { // Called when a rename or skip dialog pops up // We want to prevent someone from killing the job in the uiserver then -void ProgressItem::tqsetVisible( bool visible ) { +void ProgressItem::setVisible( bool visible ) { if ( m_visible != visible ) { m_visible = visible; @@ -792,7 +792,7 @@ ProgressItem* UIServer::findItem( int id ) void UIServer::setItemVisible( ProgressItem * item, bool visible ) { - item->tqsetVisible( visible ); + item->setVisible( visible ); // Check if we were the last one to be visible // or the first one -> hide/show the list in that case // (Note that the user could have hidden the listview by hand yet, no time) diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h index 74c1a681e..85e255a43 100644 --- a/kio/misc/uiserver.h +++ b/kio/misc/uiserver.h @@ -118,7 +118,7 @@ public: bool keepOpen() const; void finished(); - void tqsetVisible( bool visible ); + void setVisible( bool visible ); void setDefaultProgressVisible( bool visible ); bool isVisible() const { return m_visible; } diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp index 3b7a6c6d3..c5dfba9d2 100644 --- a/kio/tests/jobtest.cpp +++ b/kio/tests/jobtest.cpp @@ -532,7 +532,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) void JobTest::copyFileToSystem() { - if ( !KProtocolInfo::isKnownProtocol( TQString::tqfromLatin1( "system" ) ) ) { + if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) { kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl; return; } diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp index 348d35e34..e97f7c110 100644 --- a/kio/tests/kacltest.cpp +++ b/kio/tests/kacltest.cpp @@ -80,22 +80,22 @@ int main(int argc, char *argv[]) } #ifdef Q_OS_FREEBSD -static const TQString s_group1 = TQString::tqfromLatin1("staff"); -static const TQString s_group2 = TQString::tqfromLatin1("guest"); +static const TQString s_group1 = TQString::fromLatin1("staff"); +static const TQString s_group2 = TQString::fromLatin1("guest"); #else -static const TQString s_group1 = TQString::tqfromLatin1("audio"); -static const TQString s_group2 = TQString::tqfromLatin1("users"); +static const TQString s_group1 = TQString::fromLatin1("audio"); +static const TQString s_group2 = TQString::fromLatin1("users"); #endif -static const TQString s_testACL = TQString::tqfromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); -static const TQString s_testACL2 = TQString::tqfromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + - TQString::tqfromLatin1( "group:" ) + s_group1 + TQString::tqfromLatin1( ":--x\n" ) + - TQString::tqfromLatin1( "group:" ) + s_group2 + TQString::tqfromLatin1( ":r--\n" ) + - TQString::tqfromLatin1( "mask::r-x\nother::r--\n" ); -static const TQString s_testACLEffective = TQString::tqfromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + - TQString::tqfromLatin1( "group:" ) + s_group1 + TQString::tqfromLatin1( ":--x\n" ) + - TQString::tqfromLatin1( "group:" ) + s_group2 + TQString::tqfromLatin1( ":r--\n" ) + - TQString::tqfromLatin1( "mask::r-x\nother::r--\n" ); +static const TQString s_testACL = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); +static const TQString s_testACL2 = TQString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + + TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + + TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + + TQString::fromLatin1( "mask::r-x\nother::r--\n" ); +static const TQString s_testACLEffective = TQString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + + TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + + TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + + TQString::fromLatin1( "mask::r-x\nother::r--\n" ); KACLTest::KACLTest() :m_acl( s_testACL ) @@ -265,8 +265,8 @@ void KACLTest::testSettingExtended() // groups, all and named - const TQString expected2 = TQString::tqfromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + - TQString::tqfromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::tqfromLatin1(":r--\nmask::rwx\nother::r--\n" ); + const TQString expected2 = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + + TQString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::fromLatin1(":r--\nmask::rwx\nother::r--\n" ); CharlesII.setACL( s_testACL ); // reset ACLGroupPermissionsList groups; ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 ); diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp index c2a642c1f..a831041e1 100644 --- a/kio/tests/kdefaultprogresstest.cpp +++ b/kio/tests/kdefaultprogresstest.cpp @@ -18,7 +18,7 @@ int main(int argc, char **argv) dlg->slotTotalDirs( 0L, 1 ); dlg->slotSpeed( 0L, 55 ); - dlg->slotInfoMessage( 0L, TQString::tqfromLatin1( "Starting..." ) ); + dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Starting..." ) ); int files = 0; for ( int size = 0 ; size < 12000 ; size += 1 ) @@ -31,7 +31,7 @@ int main(int argc, char **argv) } kapp->processEvents(); } - dlg->slotInfoMessage( 0L, TQString::tqfromLatin1( "Done." ) ); + dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) ); delete dlg; return 0; diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp index ab0130860..436ae7639 100644 --- a/kio/tests/ksycocatest.cpp +++ b/kio/tests/ksycocatest.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) KApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption TQCString instname = "kword"; - TQString desktopPath = TQString::tqfromLatin1( "Office/%1.desktop" ).arg( instname ); + TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname ); qDebug( "Looking for %s", desktopPath.latin1() ); KService::Ptr service = KService::serviceByDesktopPath( desktopPath ); if ( service ) diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp index dd4d84e7f..c448cca90 100644 --- a/kio/tests/kurifiltertest.cpp +++ b/kio/tests/kurifiltertest.cpp @@ -45,7 +45,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType if( abs_path ) { - m_filterData->setAbsolutePath( TQString::tqfromLatin1( abs_path ) ); + m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) ); kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl; } else @@ -98,7 +98,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType { // Hack for other locales than english, normalize google hosts to google.com cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" ); - if ( cmd != TQString::tqfromLatin1( expectedResult ) ) + if ( cmd != TQString::fromLatin1( expectedResult ) ) { kdError() << " Got " << cmd << " expected " << expectedResult << endl; ::exit(1); |