diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
commit | f636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch) | |
tree | 5365045e6bce685a7cbaeb81b4797a719e86089f /src/kreplacements/ShellContextMenu.cpp | |
parent | 63862fdfcb61f302ef69e86d40772bb1318d3763 (diff) | |
download | kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip |
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
Diffstat (limited to 'src/kreplacements/ShellContextMenu.cpp')
-rwxr-xr-x | src/kreplacements/ShellContextMenu.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
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 <windows.h> #include <shlobj.h> #include <malloc.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qwidget.h> -#include <qdir.h> -#include <qpopupmenu.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqwidget.h> +#include <tqdir.h> +#include <tqpopupmenu.h> #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; i<pMenu->count(); ++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); |