summaryrefslogtreecommitdiffstats
path: root/kicker/menuext
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-19 01:42:14 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-19 01:42:14 +0000
commit8155225c9be993acc0512956416d195edfef4eb9 (patch)
treede4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kicker/menuext
parent364641b8e0279758d236af39abd138d379328a19 (diff)
downloadtdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz
tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/menuext')
-rw-r--r--kicker/menuext/kate/katesessionmenu.cpp4
-rw-r--r--kicker/menuext/konsole/konsole_mnu.cpp2
-rw-r--r--kicker/menuext/konsole/konsolebookmarkhandler.cpp2
-rw-r--r--kicker/menuext/konsole/konsolebookmarkmenu.cpp6
-rw-r--r--kicker/menuext/prefmenu/prefmenu.cpp14
-rw-r--r--kicker/menuext/recentdocs/recentdocsmenu.cpp10
-rw-r--r--kicker/menuext/remote/remotemenu.cpp4
-rw-r--r--kicker/menuext/system/systemmenu.cpp2
-rw-r--r--kicker/menuext/tom/tom.cc26
9 files changed, 35 insertions, 35 deletions
diff --git a/kicker/menuext/kate/katesessionmenu.cpp b/kicker/menuext/kate/katesessionmenu.cpp
index 584a345aa..860f6d04a 100644
--- a/kicker/menuext/kate/katesessionmenu.cpp
+++ b/kicker/menuext/kate/katesessionmenu.cpp
@@ -112,7 +112,7 @@ void KateSessionMenu::slotExec( int id )
TQString name = KInputDialog::getText( i18n("Session Name"),
i18n("Please enter a name for the new session"),
TQString::null,
- &ok, 0, 0, new Validator( m_parent ) );
+ &ok, 0, 0, new Validator( TQT_TQOBJECT(m_parent) ) );
if ( ! ok )
return;
@@ -124,7 +124,7 @@ void KateSessionMenu::slotExec( int id )
"kate_session_button_create_anonymous" ) == KMessageBox::No )
return;
- if ( m_sessions.contains( name ) &&
+ if ( m_sessions.tqcontains( name ) &&
KMessageBox::warningYesNo( 0,
i18n("You allready have a session named %1. Do you want to open that session?").arg( name ),
i18n("Session exists") ) == KMessageBox::No )
diff --git a/kicker/menuext/konsole/konsole_mnu.cpp b/kicker/menuext/konsole/konsole_mnu.cpp
index afd1127f6..be060b75c 100644
--- a/kicker/menuext/konsole/konsole_mnu.cpp
+++ b/kicker/menuext/konsole/konsole_mnu.cpp
@@ -185,7 +185,7 @@ void KonsoleMenu::initialize()
screenList.append(TQFile::decodeName(entry->d_name));
insertItem(SmallIconSet("konsole"),
i18n("Screen is a program controlling screens!",
- "Screen at %1").arg(entry->d_name), id);
+ "Screen at %1").tqarg(entry->d_name), id);
id++;
}
}
diff --git a/kicker/menuext/konsole/konsolebookmarkhandler.cpp b/kicker/menuext/konsole/konsolebookmarkhandler.cpp
index 46967b54c..58417e9f4 100644
--- a/kicker/menuext/konsole/konsolebookmarkhandler.cpp
+++ b/kicker/menuext/konsole/konsolebookmarkhandler.cpp
@@ -84,7 +84,7 @@ void KonsoleBookmarkHandler::slotNewBookmark( const TQString& /*text*/,
{
*m_importStream << "<bookmark icon=\"" << KMimeType::iconForURL( KURL( url ) );
*m_importStream << "\" href=\"" << TQString::fromUtf8(url) << "\">\n";
- *m_importStream << "<title>" << (additionalInfo.isEmpty() ? TQString::fromUtf8(url) : additionalInfo) << "</title>\n</bookmark>\n";
+ *m_importStream << "<title>" << (additionalInfo.isEmpty() ? TQString(TQString::fromUtf8(url)) : additionalInfo) << "</title>\n</bookmark>\n";
}
void KonsoleBookmarkHandler::slotNewFolder( const TQString& text, bool /*open*/,
diff --git a/kicker/menuext/konsole/konsolebookmarkmenu.cpp b/kicker/menuext/konsole/konsolebookmarkmenu.cpp
index 1a31fe55c..b53899a89 100644
--- a/kicker/menuext/konsole/konsolebookmarkmenu.cpp
+++ b/kicker/menuext/konsole/konsolebookmarkmenu.cpp
@@ -112,7 +112,7 @@ void KonsoleBookmarkMenu::fillBookmarkMenu()
bm = parentBookmark.next(bm) )
{
TQString text = bm.text();
- text.replace( '&', "&&" );
+ text.tqreplace( '&', "&&" );
if ( !separatorInserted && m_bIsRoot) { // inserted before the first konq bookmark, to avoid the separator if no konq bookmark
m_parentMenu->insertSeparator();
separatorInserted = true;
@@ -168,7 +168,7 @@ void KonsoleBookmarkMenu::slotBookmarkSelected()
if ( !m_pOwner ) return; // this view doesn't handle bookmarks...
a = (KAction*)sender();
b = a->text();
- m_kOwner->openBookmarkURL( TQString::fromUtf8(sender()->name()), /* URL */
+ m_kOwner->openBookmarkURL( TQString::fromUtf8(TQT_TQOBJECT_CONST(sender())->name()), /* URL */
( (KAction *)sender() )->text() /* Title */ );
}
@@ -177,7 +177,7 @@ void KonsoleBookmarkMenu::slotNSBookmarkSelected()
KAction *a;
TQString b;
- TQString link(sender()->name()+8);
+ TQString link(TQT_TQOBJECT_CONST(sender())->name()+8);
a = (KAction*)sender();
b = a->text();
m_kOwner->openBookmarkURL( link, /*URL */
diff --git a/kicker/menuext/prefmenu/prefmenu.cpp b/kicker/menuext/prefmenu/prefmenu.cpp
index 0c072e026..936d8a536 100644
--- a/kicker/menuext/prefmenu/prefmenu.cpp
+++ b/kicker/menuext/prefmenu/prefmenu.cpp
@@ -84,7 +84,7 @@ void PrefMenu::insertMenuItem(KService::Ptr& s,
if (KickerSettings::menuEntryFormat() == KickerSettings::NameAndDescription)
{
if (!suppressGenericNames ||
- !suppressGenericNames->contains(s->untranslatedGenericName()))
+ !suppressGenericNames->tqcontains(s->untranslatedGenericName()))
{
serviceName = TQString("%1 (%2)").arg(serviceName).arg(comment);
}
@@ -120,7 +120,7 @@ void PrefMenu::insertMenuItem(KService::Ptr& s,
// item names may contain ampersands. To avoid them being converted
// to accelerators, replace them with two ampersands.
- serviceName.replace("&", "&&");
+ serviceName.tqreplace("&", "&&");
int newId = insertItem(KickerLib::menuIconSet(s->icon()), serviceName, nId, nIndex);
m_entryMap.insert(newId, static_cast<KSycocaEntry*>(s));
@@ -136,7 +136,7 @@ void PrefMenu::mouseMoveEvent(TQMouseEvent * ev)
{
KPanelMenu::mouseMoveEvent(ev);
- if ((ev->state() & LeftButton) != LeftButton)
+ if ((ev->state() & Qt::LeftButton) != Qt::LeftButton)
{
return;
}
@@ -155,7 +155,7 @@ void PrefMenu::mouseMoveEvent(TQMouseEvent * ev)
return;
}
- if (!m_entryMap.contains(id))
+ if (!m_entryMap.tqcontains(id))
{
kdDebug(1210) << "Cannot find service with menu id " << id << endl;
return;
@@ -224,7 +224,7 @@ void PrefMenu::dragEnterEvent(TQDragEnterEvent *event)
void PrefMenu::dragLeaveEvent(TQDragLeaveEvent */*event*/)
{
// see PrefMenu::dragEnterEvent why this is nescessary
- if (!frameGeometry().contains(TQCursor::pos()))
+ if (!TQT_TQRECT_OBJECT(frameGeometry()).tqcontains(TQCursor::pos()))
{
KURLDrag::setTarget(0);
}
@@ -297,7 +297,7 @@ void PrefMenu::initialize()
// Item names may contain ampersands. To avoid them being converted
// to accelerators, replace each ampersand with two ampersands.
- groupCaption.replace("&", "&&");
+ groupCaption.tqreplace("&", "&&");
PrefMenu* m = new PrefMenu(g->name(), g->relPath(), this);
m->setCaption(groupCaption);
@@ -323,7 +323,7 @@ void PrefMenu::initialize()
void PrefMenu::slotExec(int id)
{
- if (!m_entryMap.contains(id))
+ if (!m_entryMap.tqcontains(id))
{
return;
}
diff --git a/kicker/menuext/recentdocs/recentdocsmenu.cpp b/kicker/menuext/recentdocs/recentdocsmenu.cpp
index b8c3c6d81..381ce3fa9 100644
--- a/kicker/menuext/recentdocs/recentdocsmenu.cpp
+++ b/kicker/menuext/recentdocs/recentdocsmenu.cpp
@@ -72,17 +72,17 @@ void RecentDocsMenu::initialize() {
// Make sure this entry is not already present in the menu
alreadyPresentInMenu = 0;
for ( TQStringList::Iterator previt = previousEntries.begin(); previt != previousEntries.end(); ++previt ) {
- if (TQString::localeAwareCompare(*previt, f.readName().replace('&', TQString::fromAscii("&&") )) == 0) {
+ if (TQString::localeAwareCompare(*previt, f.readName().tqreplace('&', TQString::fromAscii("&&") )) == 0) {
alreadyPresentInMenu = 1;
}
}
if (alreadyPresentInMenu == 0) {
// Add item to menu
- insertItem(SmallIconSet(f.readIcon()), f.readName().replace('&', TQString::fromAscii("&&") ), id++);
+ insertItem(SmallIconSet(f.readIcon()), f.readName().tqreplace('&', TQString::fromAscii("&&") ), id++);
// Append to duplicate checking list
- previousEntries.append(f.readName().replace('&', TQString::fromAscii("&&") ));
+ previousEntries.append(f.readName().tqreplace('&', TQString::fromAscii("&&") ));
}
}
@@ -111,10 +111,10 @@ void RecentDocsMenu::mousePressEvent(TQMouseEvent* e) {
void RecentDocsMenu::mouseMoveEvent(TQMouseEvent* e) {
KPanelMenu::mouseMoveEvent(e);
- if (!(e->state() & LeftButton))
+ if (!(e->state() & Qt::LeftButton))
return;
- if (!rect().contains(_mouseDown))
+ if (!TQT_TQRECT_OBJECT(rect()).tqcontains(_mouseDown))
return;
int dragLength = (e->pos() - _mouseDown).manhattanLength();
diff --git a/kicker/menuext/remote/remotemenu.cpp b/kicker/menuext/remote/remotemenu.cpp
index c09f9a825..3547e3f9b 100644
--- a/kicker/menuext/remote/remotemenu.cpp
+++ b/kicker/menuext/remote/remotemenu.cpp
@@ -93,7 +93,7 @@ void RemoteMenu::initialize()
for(; name!=endf; ++name)
{
- if (!names_found.contains(*name))
+ if (!names_found.tqcontains(*name))
{
names_found.append(*name);
TQString filename = *dirpath+*name;
@@ -124,7 +124,7 @@ void RemoteMenu::openRemoteDir()
void RemoteMenu::slotExec(int id)
{
- if (m_desktopMap.contains(id))
+ if (m_desktopMap.tqcontains(id))
{
new KRun(m_desktopMap[id]);
}
diff --git a/kicker/menuext/system/systemmenu.cpp b/kicker/menuext/system/systemmenu.cpp
index 12ec087d8..33eba2558 100644
--- a/kicker/menuext/system/systemmenu.cpp
+++ b/kicker/menuext/system/systemmenu.cpp
@@ -77,7 +77,7 @@ void SystemMenu::initialize()
void SystemMenu::slotExec(int id)
{
- if(!m_urlMap.contains(id)) return;
+ if(!m_urlMap.tqcontains(id)) return;
new KRun(m_urlMap[id]); // will delete itself
}
diff --git a/kicker/menuext/tom/tom.cc b/kicker/menuext/tom/tom.cc
index 3a4ebf4ed..3bd5e0a80 100644
--- a/kicker/menuext/tom/tom.cc
+++ b/kicker/menuext/tom/tom.cc
@@ -109,7 +109,7 @@ class runMenuWidget : public TQWidget, public QMenuItem
l2->setBuddy(this);
runLayout->addWidget(l2);*/
m_runEdit = new KHistoryCombo(this);
- m_runEdit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+ m_runEdit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
runLayout->addWidget(m_runEdit, 10);
runLayout->addSpacing(KDialog::spacingHint());
@@ -143,7 +143,7 @@ class runMenuWidget : public TQWidget, public QMenuItem
TQPainter p(this);
TQRect r(rect());
// ew, nasty hack. may result in coredumps due to horrid C-style cast???
- kapp->style().drawControl(TQStyle::CE_PopupMenuItem, &p, m_menu, r, palette().active(), TQStyle::Style_Enabled,
+ kapp->style().tqdrawControl(TQStyle::CE_PopupMenuItem, &p, m_menu, r, palette().active(), TQStyle::Style_Enabled,
TQStyleOption(static_cast<TQMenuItem*>(this), 0, KIcon::SizeMedium ));
p.drawPixmap(KDialog::spacingHint(), 1, icon);
p.drawText((KDialog::spacingHint() * 2) + KIcon::SizeMedium, textRect.height() + ((height() - textRect.height()) / 2), i18n("Run:"));
@@ -239,7 +239,7 @@ void TOM::initializeRecentDocs()
KDesktopFile f(*it, true /* read only */);
m_recentDocsMenu->insertItem(DesktopIcon(f.readIcon(), KIcon::SizeMedium),
- f.readName().replace('&', "&&"), id);
+ f.readName().tqreplace('&', "&&"), id);
++id;
}
}
@@ -302,7 +302,7 @@ int TOM::appendTaskGroup(KConfig& config, bool inSubMenu)
TQString name = config.readEntry("Name");
// in case the name contains an ampersand, double 'em up
- name.replace("&", "&&");
+ name.tqreplace("&", "&&");
TQString desktopfile = config.readPathEntry("DesktopFile");
KService::Ptr pService = KService::serviceByDesktopPath(desktopfile);
@@ -551,10 +551,10 @@ void TOM::initialize()
if (userInfo)
{
username = TQString::fromLocal8Bit(userInfo->pw_gecos);
- if (username.find(',') != -1)
+ if (username.tqfind(',') != -1)
{
// Remove everything from and including first comma
- username.truncate(username.find(','));
+ username.truncate(username.tqfind(','));
}
if (username.isEmpty())
@@ -583,7 +583,7 @@ void TOM::contextualizeRMBmenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxM
ctxMenu->removeItem(contextMenuTitleID);
TQString text = menu->text(menuItem);
- int parens = text.find('(') - 1;
+ int parens = text.tqfind('(') - 1;
if (parens > 0)
{
text = text.left(parens);
@@ -655,7 +655,7 @@ bool TOM::loadSidePixmap()
// limit max/min brightness
int r, g, b;
color.rgb(&r, &g, &b);
- int gray = qGray(r, g, b);
+ int gray = tqGray(r, g, b);
if (gray > 180) {
r = (r - (gray - 180) < 0 ? 0 : r - (gray - 180));
g = (g - (gray - 180) < 0 ? 0 : g - (gray - 180));
@@ -736,13 +736,13 @@ void TOM::setMaximumSize(int w, int h)
TQRect TOM::sideImageRect()
{
- return TQStyle::visualRect( TQRect( frameWidth(), frameWidth(), m_sidePixmap.width(),
+ return TQStyle::tqvisualRect( TQRect( frameWidth(), frameWidth(), m_sidePixmap.width(),
height() - 2*frameWidth() ), this );
}
void TOM::resizeEvent(TQResizeEvent * e)
{
- setFrameRect( TQStyle::visualRect( TQRect( m_sidePixmap.width(), 0,
+ setFrameRect( TQStyle::tqvisualRect( TQRect( m_sidePixmap.width(), 0,
width() - m_sidePixmap.width(), height() ), this ) );
}
@@ -757,7 +757,7 @@ void TOM::paintEvent(TQPaintEvent * e)
style().drawPrimitive( TQStyle::PE_PanelPopup, &p,
TQRect( 0, 0, width(), height() ),
- colorGroup(), TQStyle::Style_Default,
+ tqcolorGroup(), TQStyle::Style_Default,
TQStyleOption( frameWidth(), 0 ) );
TQRect r = sideImageRect();
@@ -775,7 +775,7 @@ TQMouseEvent TOM::translateMouseEvent( TQMouseEvent* e )
{
TQRect side = sideImageRect();
- if ( !side.contains( e->pos() ) )
+ if ( !side.tqcontains( e->pos() ) )
return *e;
TQPoint newpos( e->pos() );
@@ -824,7 +824,7 @@ void TOM::runCommand()
void TOM::runTask(int id)
{
- if (!m_tasks.contains(id)) return;
+ if (!m_tasks.tqcontains(id)) return;
kapp->propagateSessionManager();
KApplication::startServiceByDesktopPath(m_tasks[id]->desktopEntryPath(),