summaryrefslogtreecommitdiffstats
path: root/src/recentfilesaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/recentfilesaction.cpp')
-rw-r--r--src/recentfilesaction.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/recentfilesaction.cpp b/src/recentfilesaction.cpp
index ac38d6b..64ba467 100644
--- a/src/recentfilesaction.cpp
+++ b/src/recentfilesaction.cpp
@@ -15,22 +15,22 @@
#include <kstandarddirs.h>
#include <kurl.h>
-RecentFilesAction::RecentFilesAction( const QString & configGroupName, const QString& text, const QObject* receiver, const char* slot, QObject* parent, const char* name )
- : KSelectAction( text, 0/*pix*/, parent, name )
+RecentFilesAction::RecentFilesAction( const TQString & configGroupName, const TQString& text, const TQObject* receiver, const char* slot, TQObject* tqparent, const char* name )
+ : KSelectAction( text, 0/*pix*/, tqparent, name )
{
m_configGroupName = configGroupName;
m_maxItems = 10;
m_popup = new KPopupMenu;
- connect(m_popup, SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()));
- connect(m_popup, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
- connect( this, SIGNAL( activated( const QString& ) ),
- this, SLOT( itemSelected( const QString& ) ) );
+ connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow()));
+ connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int)));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( itemSelected( const TQString& ) ) );
setMenuAccelsEnabled( false );
if ( receiver )
- connect( this, SIGNAL(urlSelected(const KURL &)), receiver, slot );
+ connect( this, TQT_SIGNAL(urlSelected(const KURL &)), receiver, slot );
}
@@ -44,13 +44,13 @@ void RecentFilesAction::addURL( const KURL& url )
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- QString file;
+ TQString file;
if ( url.isLocalFile() && url.ref().isNull() && url.query().isNull() )
file = url.path();
else
file = url.prettyURL();
- QStringList lst = items();
+ TQStringList lst = items();
// remove file if already in list
lst.remove( file );
@@ -74,10 +74,10 @@ void RecentFilesAction::loadEntries()
{
KConfig * config = KGlobal::config();
- QString key;
- QString value;
- QString oldGroup;
- QStringList lst;
+ TQString key;
+ TQString value;
+ TQString oldGroup;
+ TQStringList lst;
oldGroup = config->group();
@@ -86,7 +86,7 @@ void RecentFilesAction::loadEntries()
// read file list
for( unsigned int i = 1 ; i <= m_maxItems ; i++ )
{
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).tqarg( i );
value = config->readPathEntry( key );
if (!value.isNull())
@@ -103,10 +103,10 @@ void RecentFilesAction::saveEntries()
{
KConfig * config = KGlobal::config();
- QString key;
- QString value;
- QString oldGroup;
- QStringList lst = items();
+ TQString key;
+ TQString value;
+ TQString oldGroup;
+ TQStringList lst = items();
oldGroup = config->group();
@@ -116,7 +116,7 @@ void RecentFilesAction::saveEntries()
// write file list
for( unsigned int i = 1 ; i <= lst.count() ; i++ )
{
- key = QString( "File%1" ).arg( i );
+ key = TQString( "File%1" ).tqarg( i );
value = lst[ i - 1 ];
config->writePathEntry( key, value );
}
@@ -126,7 +126,7 @@ void RecentFilesAction::saveEntries()
config->sync();
}
-void RecentFilesAction::itemSelected( const QString& text )
+void RecentFilesAction::itemSelected( const TQString& text )
{
emit urlSelected( KURL( text ) );
}
@@ -140,9 +140,9 @@ void RecentFilesAction::menuAboutToShow()
{
KPopupMenu *menu = m_popup;
menu->clear();
- QStringList list = items();
- QStringList::iterator end = list.end();
- for ( QStringList::Iterator it = list.begin(); it != end; ++it )
+ TQStringList list = items();
+ TQStringList::iterator end = list.end();
+ for ( TQStringList::Iterator it = list.begin(); it != end; ++it )
menu->insertItem(*it);
}
@@ -151,7 +151,7 @@ void RecentFilesAction::slotClicked()
KAction::slotActivated();
}
-void RecentFilesAction::slotActivated(const QString& text)
+void RecentFilesAction::slotActivated(const TQString& text)
{
KSelectAction::slotActivated(text);
}