summaryrefslogtreecommitdiffstats
path: root/win/win32_utils2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'win/win32_utils2.cpp')
-rw-r--r--win/win32_utils2.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/win/win32_utils2.cpp b/win/win32_utils2.cpp
index fe693151e..2e46d2acb 100644
--- a/win/win32_utils2.cpp
+++ b/win/win32_utils2.cpp
@@ -17,22 +17,22 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <windows.h>
#include <shellapi.h>
#include <tchar.h>
KDEWIN32_EXPORT
-QString getWin32RegistryValue(HKEY key, const QString& subKey, const QString& item, bool *ok)
+TQString getWin32RegistryValue(HKEY key, const TQString& subKey, const TQString& item, bool *ok)
{
#define FAILURE \
{ if (ok) \
*ok = false; \
- return QString::null; }
+ return TQString::null; }
if (!subKey)
FAILURE;
@@ -54,50 +54,50 @@ QString getWin32RegistryValue(HKEY key, const QString& subKey, const QString& it
}
RegCloseKey(hKey);
- QString res = QString::fromUcs2(lszValue);
+ TQString res = TQString::fromUcs2(lszValue);
delete [] lszValue;
return res;
}
KDEWIN32_EXPORT
-bool showWin32FilePropertyDialog(const QString& fileName)
+bool showWin32FilePropertyDialog(const TQString& fileName)
{
- QString path_ = QDir::convertSeparators(QFileInfo(fileName).absFilePath());
+ TQString path_ = TQDir::convertSeparators(TQFileInfo(fileName).absFilePath());
SHELLEXECUTEINFO execInfo;
memset(&execInfo,0,sizeof(execInfo));
execInfo.cbSize = sizeof(execInfo);
execInfo.fMask = SEE_MASK_INVOKEIDLIST | SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI;
- const QString verb("properties");
+ const TQString verb("properties");
execInfo.lpVerb = (TCHAR*)verb.ucs2();
execInfo.lpFile = (TCHAR*)path_.ucs2();
return ShellExecuteEx(&execInfo);
}
KDEWIN32_EXPORT
-QCString getWin32LocaleName()
+TQCString getWin32LocaleName()
{
bool ok;
- QString localeNumber = getWin32RegistryValue(HKEY_CURRENT_USER, "Control Panel\\International",
+ TQString localeNumber = getWin32RegistryValue(HKEY_CURRENT_USER, "Control Panel\\International",
"Locale", &ok);
if (!ok)
- return QCString();
- QString localeName = getWin32RegistryValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\\DosKeybCodes",
+ return TQCString();
+ TQString localeName = getWin32RegistryValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\\DosKeybCodes",
localeNumber, &ok);
if (!ok)
- return QCString();
+ return TQCString();
return localeName.latin1();
}
KDEWIN32_EXPORT
-QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
+TQString convertKFileDialogFilterToQFileDialogFilter(const TQString& filter)
{
- QString kde_filters = filter;
+ TQString kde_filters = filter;
int pos;
// Strip the escape characters from
// escaped '/' characters.
- QString copy (kde_filters);
+ TQString copy (kde_filters);
for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos)
copy.remove(pos, 1);
@@ -105,13 +105,13 @@ QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
//we need to convert KDE filter format to Qt format
//Qt format: "some text (*.first *.second)" or "All (*)"
//KDE format: "*.first *.second" or "*"
- QStringList filters = QStringList::split("\n",kde_filters);
- QString current;
- QString converted; //finally - converted filter
- for (QStringList::ConstIterator it = filters.constBegin(); it!=filters.constEnd();++it) {
+ TQStringList filters = TQStringList::split("\n",kde_filters);
+ TQString current;
+ TQString converted; //finally - converted filter
+ for (TQStringList::ConstIterator it = filters.constBegin(); it!=filters.constEnd();++it) {
current = *it;
- QString new_f;//filter part
- QString new_name;//filter name part
+ TQString new_f;//filter part
+ TQString new_name;//filter name part
int p = (*it).find('|');
if (p!=-1) {
new_f = current.left(p);
@@ -124,7 +124,7 @@ QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
//remove (.....) from name
p=new_name.find('(');
int p2 = new_name.findRev(')');
- QString new_name1, new_name2;
+ TQString new_name1, new_name2;
if (p!=-1)
new_name1 = new_name.left(p);
if (p2!=-1)
@@ -136,9 +136,9 @@ QString convertKFileDialogFilterToQFileDialogFilter(const QString& filter)
new_name = new_name.stripWhiteSpace();
// make filters unique: remove uppercase extensions (case doesn't matter on win32, BTW)
- QStringList allfiltersUnique;
- QStringList origList( QStringList::split(" ", new_f) );
- for (QStringList::ConstIterator it = origList.constBegin();
+ TQStringList allfiltersUnique;
+ TQStringList origList( TQStringList::split(" ", new_f) );
+ for (TQStringList::ConstIterator it = origList.constBegin();
it!=origList.constEnd(); ++it)
{
if ((*it) == (*it).lower())