summaryrefslogtreecommitdiffstats
path: root/kmenuedit
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 /kmenuedit
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 'kmenuedit')
-rw-r--r--kmenuedit/basictab.cpp4
-rw-r--r--kmenuedit/basictab.h4
-rw-r--r--kmenuedit/kmenuedit.cpp8
-rw-r--r--kmenuedit/menufile.cpp6
-rw-r--r--kmenuedit/menuinfo.cpp14
-rw-r--r--kmenuedit/treeview.cpp42
-rw-r--r--kmenuedit/treeview.h2
7 files changed, 40 insertions, 40 deletions
diff --git a/kmenuedit/basictab.cpp b/kmenuedit/basictab.cpp
index 1ab175c1..57230186 100644
--- a/kmenuedit/basictab.cpp
+++ b/kmenuedit/basictab.cpp
@@ -468,8 +468,8 @@ void BasicTab::slotCapturedShortcut(const KShortcut& cut)
if (signalsBlocked())
return;
- if( KKeyChooser::checkGlobalShortcutsConflict( cut, true, topLevelWidget())
- || KKeyChooser::checkStandardShortcutsConflict( cut, true, topLevelWidget()))
+ if( KKeyChooser::checkGlobalShortcutsConflict( cut, true, tqtopLevelWidget())
+ || KKeyChooser::checkStandardShortcutsConflict( cut, true, tqtopLevelWidget()))
return;
if ( KHotKeys::present() )
diff --git a/kmenuedit/basictab.h b/kmenuedit/basictab.h
index e2c72277..fb4555c6 100644
--- a/kmenuedit/basictab.h
+++ b/kmenuedit/basictab.h
@@ -38,7 +38,7 @@ class KService;
class MenuFolderInfo;
class MenuEntryInfo;
-class BasicTab : public QWidget
+class BasicTab : public TQWidget
{
Q_OBJECT
@@ -77,7 +77,7 @@ protected:
KIconButton *_iconButton;
TQGroupBox *_path_group, *_term_group, *_uid_group, *general_group_keybind;
TQLabel *_termOptLabel, *_uidLabel, *_pathLabel, *_nameLabel, *_commentLabel, *_execLabel;
- QLabel *_descriptionLabel;
+ TQLabel *_descriptionLabel;
MenuFolderInfo *_menuFolderInfo;
MenuEntryInfo *_menuEntryInfo;
diff --git a/kmenuedit/kmenuedit.cpp b/kmenuedit/kmenuedit.cpp
index 37ab1367..0f518f06 100644
--- a/kmenuedit/kmenuedit.cpp
+++ b/kmenuedit/kmenuedit.cpp
@@ -67,12 +67,12 @@ void KMenuEdit::setupActions()
if (!m_controlCenter)
(void)new KAction(i18n("New S&eparator"), "menu_new_sep", 0, actionCollection(), "newsep");
- (void)new KAction(i18n("Save && Quit"), "filesave_and_close", 0, this, TQT_SLOT( slotSave_and_close()), actionCollection(), "file_save_and_quit");
+ (void)new KAction(i18n("Save && Quit"), "filesave_and_close", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSave_and_close()), actionCollection(), "file_save_and_quit");
m_actionDelete = 0;
- KStdAction::save(this, TQT_SLOT( slotSave() ), actionCollection());
- KStdAction::quit(this, TQT_SLOT( close() ), actionCollection());
+ KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT( slotSave() ), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection());
KStdAction::cut(0, 0, actionCollection());
KStdAction::copy(0, 0, actionCollection());
KStdAction::paste(0, 0, actionCollection());
@@ -80,7 +80,7 @@ void KMenuEdit::setupActions()
void KMenuEdit::setupView()
{
- m_splitter = new TQSplitter(Horizontal, this);
+ m_splitter = new TQSplitter(Qt::Horizontal, this);
m_tree = new TreeView(m_controlCenter, actionCollection(), m_splitter);
m_basicTab = new BasicTab(m_splitter);
diff --git a/kmenuedit/menufile.cpp b/kmenuedit/menufile.cpp
index d1582c23..db4c64cd 100644
--- a/kmenuedit/menufile.cpp
+++ b/kmenuedit/menufile.cpp
@@ -123,7 +123,7 @@ TQDomElement MenuFile::findMenu(TQDomElement elem, const TQString &menuName, boo
{
TQString menuNodeName;
TQString subMenuName;
- int i = menuName.find('/');
+ int i = menuName.tqfind('/');
if (i >= 0)
{
menuNodeName = menuName.left(i);
@@ -200,7 +200,7 @@ static TQString entryToDirId(const TQString &path)
if (local.isEmpty() || local.startsWith("/"))
{
// What now? Use filename only and hope for the best.
- local = path.mid(path.findRev('/')+1);
+ local = path.mid(path.tqfindRev('/')+1);
}
return local;
}
@@ -468,7 +468,7 @@ TQString MenuFile::uniqueMenuName(const TQString &menuName, const TQString &newM
for(int n = 1; ++n; )
{
- if (findMenu(elem, result, false).isNull() && !excludeList.contains(result))
+ if (findMenu(elem, result, false).isNull() && !excludeList.tqcontains(result))
return result;
result.truncate(trunc);
diff --git a/kmenuedit/menuinfo.cpp b/kmenuedit/menuinfo.cpp
index affb0bcb..db5df828 100644
--- a/kmenuedit/menuinfo.cpp
+++ b/kmenuedit/menuinfo.cpp
@@ -53,13 +53,13 @@ void MenuFolderInfo::add(MenuFolderInfo *info, bool initial)
// Remove sub menu (without deleting it)
void MenuFolderInfo::take(MenuFolderInfo *info)
{
- subFolders.take(subFolders.findRef(info));
+ subFolders.take(subFolders.tqfindRef(info));
}
// Remove sub menu (without deleting it)
bool MenuFolderInfo::takeRecursive(MenuFolderInfo *info)
{
- int i = subFolders.findRef(info);
+ int i = subFolders.tqfindRef(info);
if (i >= 0)
{
subFolders.take(i);
@@ -106,7 +106,7 @@ void MenuFolderInfo::take(MenuEntryInfo *entry)
TQString MenuFolderInfo::uniqueMenuCaption(const TQString &caption)
{
TQRegExp r("(.*)(?=-\\d+)");
- TQString cap = (r.search(caption) > -1) ? r.cap(1) : caption;
+ TQString cap = (r.search(caption) > -1) ? TQString(r.cap(1)) : caption;
TQString result = caption;
@@ -134,7 +134,7 @@ TQString MenuFolderInfo::uniqueMenuCaption(const TQString &caption)
TQString MenuFolderInfo::uniqueItemCaption(const TQString &caption, const TQString &exclude)
{
TQRegExp r("(.*)(?=-\\d+)");
- TQString cap = (r.search(caption) > -1) ? r.cap(1) : caption;
+ TQString cap = (r.search(caption) > -1) ? TQString(r.cap(1)) : caption;
TQString result = caption;
@@ -489,14 +489,14 @@ bool MenuEntryInfo::isShortcutAvailable(const KShortcut &_shortcut)
{
s_allShortcuts = new TQStringList(KHotKeys::allShortCuts());
}
- available = !s_allShortcuts->contains(shortcutKey);
+ available = !s_allShortcuts->tqcontains(shortcutKey);
if (available && s_newShortcuts)
{
- available = !s_newShortcuts->contains(shortcutKey);
+ available = !s_newShortcuts->tqcontains(shortcutKey);
}
if (!available && s_freeShortcuts)
{
- available = s_freeShortcuts->contains(shortcutKey);
+ available = s_freeShortcuts->tqcontains(shortcutKey);
}
return available;
}
diff --git a/kmenuedit/treeview.cpp b/kmenuedit/treeview.cpp
index 693ba568..ef2e0508 100644
--- a/kmenuedit/treeview.cpp
+++ b/kmenuedit/treeview.cpp
@@ -278,7 +278,7 @@ void TreeView::readMenuFolderInfo(MenuFolderInfo *folderInfo, KServiceGroup::Ptr
folderInfo->directoryFile = folder->directoryEntryPath();
folderInfo->icon = folder->icon();
TQString id = folder->relPath();
- int i = id.findRev('/', -2);
+ int i = id.tqfindRev('/', -2);
id = id.mid(i+1);
folderInfo->id = id;
folderInfo->fullId = prefix + id;
@@ -472,7 +472,7 @@ void TreeView::selectMenu(const TQString &menu)
TreeItem *item = 0;
do
{
- int i = restMenu.find("/");
+ int i = restMenu.tqfind("/");
TQString subMenu = restMenu.left(i+1);
restMenu = restMenu.mid(i+1);
@@ -592,7 +592,7 @@ TQStringList TreeView::fileList(const TQString& rPath)
TQString relativePath = rPath;
// truncate "/.directory"
- int pos = relativePath.findRev("/.directory");
+ int pos = relativePath.tqfindRev("/.directory");
if (pos > 0) relativePath.truncate(pos);
TQStringList filelist;
@@ -611,7 +611,7 @@ TQStringList TreeView::fileList(const TQString& rPath)
TQStringList files = dir.entryList();
for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
// does not work?!
- //if (filelist.contains(*it)) continue;
+ //if (filelist.tqcontains(*it)) continue;
if (relativePath.isEmpty()) {
filelist.remove(*it); // hack
@@ -631,7 +631,7 @@ TQStringList TreeView::dirList(const TQString& rPath)
TQString relativePath = rPath;
// truncate "/.directory"
- int pos = relativePath.findRev("/.directory");
+ int pos = relativePath.tqfindRev("/.directory");
if (pos > 0) relativePath.truncate(pos);
TQStringList dirlist;
@@ -649,7 +649,7 @@ TQStringList TreeView::dirList(const TQString& rPath)
for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) {
if ((*it) == "." || (*it) == "..") continue;
// does not work?!
- // if (dirlist.contains(*it)) continue;
+ // if (dirlist.tqcontains(*it)) continue;
if (relativePath.isEmpty()) {
dirlist.remove(*it); //hack
@@ -679,8 +679,8 @@ bool TreeView::acceptDrag(TQDropEvent* e) const
static TQString createDesktopFile(const TQString &file, TQString *menuId, TQStringList *excludeList)
{
- TQString base = file.mid(file.findRev('/')+1);
- base = base.left(base.findRev('.'));
+ TQString base = file.mid(file.tqfindRev('/')+1);
+ base = base.left(base.tqfindRev('.'));
TQRegExp r("(.*)(?=-\\d+)");
base = (r.search(base) > -1) ? r.cap(1) : base;
@@ -703,8 +703,8 @@ static KDesktopFile *copyDesktopFile(MenuEntryInfo *entryInfo, TQString *menuId,
static TQString createDirectoryFile(const TQString &file, TQStringList *excludeList)
{
- TQString base = file.mid(file.findRev('/')+1);
- base = base.left(base.findRev('.'));
+ TQString base = file.mid(file.tqfindRev('/')+1);
+ base = base.left(base.tqfindRev('.'));
TQString result;
int i = 1;
@@ -715,7 +715,7 @@ static TQString createDirectoryFile(const TQString &file, TQStringList *excludeL
else
result = base + TQString("-%1.directory").arg(i);
- if (!excludeList->contains(result))
+ if (!excludeList->tqcontains(result))
{
if (locate("xdgdata-dirs", result).isEmpty())
break;
@@ -808,11 +808,11 @@ void TreeView::slotDropped (TQDropEvent * e, TQListViewItem *parent, TQListViewI
m_drag = 0;
return;
}
- tmpItem = static_cast<TreeItem*>(tmpItem->parent() );
+ tmpItem = static_cast<TreeItem*>(tmpItem->tqparent() );
}
// Remove MenuFolderInfo
- TreeItem *oldParentItem = static_cast<TreeItem*>(m_dragItem->parent());
+ TreeItem *oldParentItem = static_cast<TreeItem*>(m_dragItem->tqparent());
MenuFolderInfo *oldParentFolderInfo = oldParentItem ? oldParentItem->folderInfo() : m_rootFolder;
oldParentFolderInfo->take(folderInfo);
@@ -997,7 +997,7 @@ void TreeView::newsubmenu()
if (!ok) return;
TQString file = caption;
- file.replace('/', '-');
+ file.tqreplace('/', '-');
file = createDirectoryFile(file, &m_newDirectoryList); // Create
@@ -1017,7 +1017,7 @@ void TreeView::newsubmenu()
}
else
{
- parentItem = static_cast<TreeItem*>(item->parent());
+ parentItem = static_cast<TreeItem*>(item->tqparent());
folder = parentItem ? parentItem->directory() : TQString::null;
}
@@ -1069,7 +1069,7 @@ void TreeView::newitem()
TQString menuId;
TQString file = caption;
- file.replace('/', '-');
+ file.tqreplace('/', '-');
file = createDesktopFile(file, &menuId, &m_newMenuIds); // Create
@@ -1093,7 +1093,7 @@ void TreeView::newitem()
}
else
{
- parentItem = static_cast<TreeItem*>(item->parent());
+ parentItem = static_cast<TreeItem*>(item->tqparent());
folder = parentItem ? parentItem->directory() : TQString::null;
}
@@ -1139,7 +1139,7 @@ void TreeView::newsep()
}
else
{
- parentItem = static_cast<TreeItem*>(item->parent());
+ parentItem = static_cast<TreeItem*>(item->tqparent());
}
// create the TreeItem
@@ -1181,7 +1181,7 @@ void TreeView::copy( bool cutting )
if (item == 0) return;
if (cutting)
- setLayoutDirty((TreeItem*)item->parent());
+ setLayoutDirty((TreeItem*)item->tqparent());
// clean up old stuff
cleanupClipboard();
@@ -1256,7 +1256,7 @@ void TreeView::paste()
}
else
{
- parentItem = static_cast<TreeItem*>(item->parent());
+ parentItem = static_cast<TreeItem*>(item->tqparent());
folder = parentItem ? parentItem->directory() : TQString::null;
}
@@ -1384,7 +1384,7 @@ void TreeView::del()
void TreeView::del(TreeItem *item, bool deleteInfo)
{
- TreeItem *parentItem = static_cast<TreeItem*>(item->parent());
+ TreeItem *parentItem = static_cast<TreeItem*>(item->tqparent());
// is file a .directory or a .desktop file
if(item->isDirectory())
{
diff --git a/kmenuedit/treeview.h b/kmenuedit/treeview.h
index ebb5c6d1..5811a215 100644
--- a/kmenuedit/treeview.h
+++ b/kmenuedit/treeview.h
@@ -36,7 +36,7 @@ class MenuEntryInfo;
class MenuSeparatorInfo;
class KShortcut;
-class TreeItem : public QListViewItem
+class TreeItem : public TQListViewItem
{
public:
TreeItem(TQListViewItem *parent, TQListViewItem *after, const TQString &menuIdn, bool __init = false);