From 0a80cfd57d271dd44221467efb426675fa470356 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 18:31:12 +0000 Subject: TQt4 port kvirc This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/modules/sharedfile/libkvisharedfile.cpp | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/modules/sharedfile/libkvisharedfile.cpp') diff --git a/src/modules/sharedfile/libkvisharedfile.cpp b/src/modules/sharedfile/libkvisharedfile.cpp index 93959f77..adbf7af1 100644 --- a/src/modules/sharedfile/libkvisharedfile.cpp +++ b/src/modules/sharedfile/libkvisharedfile.cpp @@ -52,7 +52,7 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; @short: Adds a file sharedfile @syntax: - sharedfile.add [-t=] [-n=] [user_mask] + sharedfile.add [-t=] [-n=] [user_tqmask] @switches: !sw: -t= | --timeout= Specified the timeout after that the share will be automatically removed @@ -61,8 +61,8 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; @description: Adds to the list of the active shared files. The users will be able to request the file via [cmd]dcc.get[/cmd]. - If [user_mask] is specified , the access to the file is limited - to the users that match this mask, otherwise the mask will + If [user_tqmask] is specified , the access to the file is limited + to the users that match this tqmask, otherwise the tqmask will be automatically set to '*!*@*'.[br] If the 't' switch is used, the sharedfile will be removed after seconds. If the 'n' switch is used, the sharedfile @@ -76,10 +76,10 @@ extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) { - QString szFileName,szUserMask; + TQString szFileName,szUserMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("filename",KVS_PT_NONEMPTYSTRING,0,szFileName) - KVSM_PARAMETER("user_mask",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szUserMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_NONEMPTYSTRING,KVS_PF_OPTIONAL,szUserMask) KVSM_PARAMETERS_END(c) if(!KviFileUtils::isReadable(szFileName)) @@ -91,12 +91,12 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) if(szUserMask.isEmpty())szUserMask="*!*@*"; KviIrcMask u(szUserMask); - QString szm; - u.mask(szm); + TQString szm; + u.tqmask(szm); kvs_int_t timeout = 0; - if(KviKvsVariant * v = c->switches()->find('t',"timeout")) + if(KviKvsVariant * v = c->switches()->tqfind('t',"timeout")) { if(!v->asInteger(timeout)) { @@ -105,12 +105,12 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) } } - QString szVisibleName = szFileName; - KviQString::cutToLast(szVisibleName,'/'); + TQString szVisibleName = szFileName; + KviTQString::cutToLast(szVisibleName,'/'); - if(KviKvsVariant * n = c->switches()->find('n',"name")) + if(KviKvsVariant * n = c->switches()->tqfind('n',"name")) { - QString tmp; + TQString tmp; n->asString(tmp); if(tmp.isEmpty()) { @@ -138,9 +138,9 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) @short: Removes a shared file @syntax: - sharedfile.remove [filesize:integer] + sharedfile.remove [filesize:integer] @description: - Removes the shared file that matches and . + Removes the shared file that matches and . If [filesize] is specified, then it must be matched by the entry to be removed. @seealso: @@ -149,16 +149,16 @@ static bool sharedfile_kvs_cmd_add(KviKvsModuleCommandCall * c) static bool sharedfile_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szVisibleName,szUserMask; + TQString szVisibleName,szUserMask; kvs_uint_t uSize; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("visible_name",KVS_PT_NONEMPTYSTRING,0,szVisibleName) - KVSM_PARAMETER("user_mask",KVS_PT_NONEMPTYSTRING,0,szUserMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_NONEMPTYSTRING,0,szUserMask) KVSM_PARAMETER("filesize",KVS_PT_UINT,KVS_PF_OPTIONAL,uSize) KVSM_PARAMETERS_END(c) if(!g_pSharedFilesManager->removeSharedFile(szVisibleName,szUserMask,uSize)) - c->warning(__tr2qs_ctx("No sharedfile with visible name '%Q' and user mask '%Q'","sharedfile"),&szVisibleName,&szUserMask); + c->warning(__tr2qs_ctx("No sharedfile with visible name '%Q' and user tqmask '%Q'","sharedfile"),&szVisibleName,&szUserMask); return true; } @@ -210,7 +210,7 @@ static bool sharedfile_kvs_cmd_clear(KviKvsModuleCommandCall * c) static bool sharedfile_kvs_cmd_list(KviKvsModuleCommandCall * c) { - KviPointerHashTableIterator it(*(g_pSharedFilesManager->sharedFileListDict())); + KviPointerHashTableIterator it(*(g_pSharedFilesManager->sharedFileListDict())); int idx = 0; -- cgit v1.2.1