From f636ba5ba2df9d34d56b1c85f24c6598fa1cb645 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 27 Jun 2011 05:58:16 +0000 Subject: TQt4 port kdiff3 This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/kreplacements/ShellContextMenu.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/kreplacements/ShellContextMenu.cpp') diff --git a/src/kreplacements/ShellContextMenu.cpp b/src/kreplacements/ShellContextMenu.cpp index e1a6d2d..6be2532 100755 --- a/src/kreplacements/ShellContextMenu.cpp +++ b/src/kreplacements/ShellContextMenu.cpp @@ -21,11 +21,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "ShellContextMenu.h" #ifdef _DEBUG @@ -42,10 +42,10 @@ static char THIS_FILE[]=__FILE__; #define MAX_ID 10000 -void showShellContextMenu( const QString& itemPath, QPoint pt, QWidget* pParentWidget, QPopupMenu* pMenu ) +void showShellContextMenu( const TQString& itemPath, TQPoint pt, TQWidget* pParentWidget, TQPopupMenu* pMenu ) { CShellContextMenu scm; - scm.SetObjects(QDir::convertSeparators(itemPath)); + scm.SetObjects(TQDir::convertSeparators(itemPath)); int id = scm.ShowContextMenu (pParentWidget, pt, pMenu); if (id>=1) pMenu->activateItemAt(id-1); @@ -145,7 +145,7 @@ LRESULT CALLBACK CShellContextMenu::HookWndProc(HWND hWnd, UINT message, WPARAM } -UINT CShellContextMenu::ShowContextMenu(QWidget * pParentWidget, QPoint pt, QPopupMenu* pMenu ) +UINT CShellContextMenu::ShowContextMenu(TQWidget * pParentWidget, TQPoint pt, TQPopupMenu* pMenu ) { HWND hWnd = pParentWidget->winId(); int iMenuType = 0; // to know which version of IContextMenu is supported @@ -163,7 +163,7 @@ UINT CShellContextMenu::ShowContextMenu(QWidget * pParentWidget, QPoint pt, QPop UINT_PTR i; for( i=0; icount(); ++i ) { - QString s = pMenu->text(pMenu->idAt(i)); + TQString s = pMenu->text(pMenu->idAt(i)); if (!s.isEmpty()) AppendMenuW( m_hMenu, MF_STRING, i+1, (LPCWSTR)s.ucs2() ); } @@ -215,10 +215,10 @@ void CShellContextMenu::InvokeCommand (LPCONTEXTMENU pContextMenu, UINT idComman } -void CShellContextMenu::SetObjects(const QString& strObject) +void CShellContextMenu::SetObjects(const TQString& strObject) { // only one object is passed - QStringList strArray; + TQStringList strArray; strArray << strObject; // create a CStringArray with one element SetObjects (strArray); // and pass it to SetObjects (CStringArray &strArray) @@ -226,7 +226,7 @@ void CShellContextMenu::SetObjects(const QString& strObject) } -void CShellContextMenu::SetObjects(const QStringList &strList) +void CShellContextMenu::SetObjects(const TQStringList &strList) { // free all allocated datas if (m_psfFolder && bDelete) @@ -246,7 +246,7 @@ void CShellContextMenu::SetObjects(const QStringList &strList) psfDesktop->ParseDisplayName (NULL, 0, (LPOLESTR)strList[0].ucs2(), NULL, &pidl, NULL); - // now we need the parent IShellFolder interface of pidl, and the relative PIDL to that interface + // now we need the tqparent IShellFolder interface of pidl, and the relative PIDL to that interface LPITEMIDLIST pidlItem = NULL; // relative pidl SHBindToParentEx (pidl, IID_IShellFolder, (void **) &m_psfFolder, NULL); free (pidlItem); @@ -255,9 +255,9 @@ void CShellContextMenu::SetObjects(const QStringList &strList) SHGetMalloc (&lpMalloc); lpMalloc->Free (pidl); - // now we have the IShellFolder interface to the parent folder specified in the first element in strArray + // now we have the IShellFolder interface to the tqparent folder specified in the first element in strArray // since we assume that all objects are in the same folder (as it's stated in the MSDN) - // we now have the IShellFolder interface to every objects parent folder + // we now have the IShellFolder interface to every objects tqparent folder IShellFolder * psfFolder = NULL; nItems = strList.size (); @@ -295,7 +295,7 @@ void CShellContextMenu::SetObjects(LPITEMIDLIST /*pidl*/) m_pidlArray = NULL; // full qualified PIDL is passed so we need - // its parent IShellFolder interface and its relative PIDL to that + // its tqparent IShellFolder interface and its relative PIDL to that LPITEMIDLIST pidlItem = NULL; SHBindToParent ((LPCITEMIDLIST) pidl, IID_IShellFolder, (void **) &m_psfFolder, (LPCITEMIDLIST *) &pidlItem); -- cgit v1.2.1