summaryrefslogtreecommitdiffstats
path: root/src/apt.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:38:25 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:38:25 +0000
commitf22f5c856d0ee7ec953825828bba094f14c9cade (patch)
tree1c89a4d4c420bce13c002b650e610bff026f6d06 /src/apt.h
parent0bceb5251f3c826f8fc4ee021ab76ee29f1dfdd7 (diff)
downloadtdeio-apt-f22f5c856d0ee7ec953825828bba094f14c9cade.tar.gz
tdeio-apt-f22f5c856d0ee7ec953825828bba094f14c9cade.zip
TQt4 port kio-apt
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kio-apt@1239302 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/apt.h')
-rw-r--r--src/apt.h59
1 files changed, 30 insertions, 29 deletions
diff --git a/src/apt.h b/src/apt.h
index d18ffa8..82c5a63 100644
--- a/src/apt.h
+++ b/src/apt.h
@@ -1,8 +1,8 @@
#ifndef KIOAPT_APTPROTOCOL_H
#define KIOAPT_APTPROTOCOL_H
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
#include <kio/global.h>
@@ -14,22 +14,23 @@
#include <memory>
-class QCString;
+class TQCString;
namespace Parsers
{
class Parser;
}
-class AptProtocol : public QObject, public KIO::SlaveBase {
+class AptProtocol : public TQObject, public KIO::SlaveBase {
Q_OBJECT
+ TQ_OBJECT
friend class AptCache;
AptCache m_process;
PackageManager* m_adept_batch;
- typedef QMap<QString, QString> QueryOptions;
+ typedef TQMap<TQString, TQString> QueryOptions;
/** This this the URL that should be used if we want
* to get the same output again. It is especially
@@ -47,14 +48,14 @@ class AptProtocol : public QObject, public KIO::SlaveBase {
* mode (for forbidding install, for instance) */
bool m_act, m_search, m_internal;
- QString m_stylesheet;
- QString m_header_background;
- QString m_logo;
- QString m_logo_alt;
+ TQString m_stylesheet;
+ TQString m_header_background;
+ TQString m_logo;
+ TQString m_logo_alt;
public:
- AptProtocol( const QCString &pool_socket, const QCString &app_socket );
+ AptProtocol( const TQCString &pool_socket, const TQCString &app_socket );
virtual ~AptProtocol();
virtual void mimetype( const KURL& url );
virtual void get ( const KURL& url );
@@ -63,26 +64,26 @@ public:
* SlaveBase::data() sends a byte array as is. Since we
* definitely don't want to send \0 to the master,
* we redefine data() for strings */
- void data(const QCString& string);
+ void data(const TQCString& string);
/** @overload */
- void data(const QString& string);
+ void data(const TQString& string);
/** @overload */
void data(const char* string);
- void data(const QByteArray& array);
+ void data(const TQByteArray& array);
- KURL buildURL(const QString& command, const QString& query) const;
+ KURL buildURL(const TQString& command, const TQString& query) const;
KURL buildURL(const KURL& query) const;
- QString stylesheet() const;
- QString header_background() const;
- QString logo() const;
- QString logo_alt() const;
+ TQString stylesheet() const;
+ TQString header_background() const;
+ TQString logo() const;
+ TQString logo_alt() const;
private slots:
- void token_dispatch(const QString& tag, const QString& value);
+ void token_dispatch(const TQString& tag, const TQString& value);
private:
std::auto_ptr<Parsers::Parser> m_parser;
@@ -90,24 +91,24 @@ private:
/** apt-cache search
* Performs apt-cache search, with the query encoded in url.query()
* and sends the result as an HTML file */
- void search( const QString& url, const QueryOptions& options );
+ void search( const TQString& url, const QueryOptions& options );
/** apt-cache show
* Performs apt-cache search, with the package name encoded in url.query()
* and sends the result as an HTML file.
* It checks that the query contains a valid package name */
- void show( const QString& url, const QueryOptions& options );
+ void show( const TQString& url, const QueryOptions& options );
/** apt-cache policy
* Performs apt-cache policy, with the package name encoded in url.query()
* and sends the result as an HTML file.
* It checks that the query contains a valid package name */
- void policy( const QString& url, const QueryOptions& options );
+ void policy( const TQString& url, const QueryOptions& options );
/**
* Sends an application/x-adept_batch file with commands
* understandable by adept_batch */
- void adept_batch( const QString& url, const QueryOptions& options );
+ void adept_batch( const TQString& url, const QueryOptions& options );
/**
* Shows a form where one can enter parameters for some queries
@@ -116,19 +117,19 @@ private:
/** Offline listing of the file of a package */
bool can_listfiles(bool is_installed) const;
- void listfiles( const QString& query, const QueryOptions& options);
+ void listfiles( const TQString& query, const QueryOptions& options);
/** Offline file search.
* Searches the package which contains the specified file */
bool can_searchfile(bool is_installed) const;
- void searchfile( const QString& query, const QueryOptions& options);
+ void searchfile( const TQString& query, const QueryOptions& options);
bool can_online(int mode) const;
- void online( const QString& query, const QueryOptions& options);
+ void online( const TQString& query, const QueryOptions& options);
- bool check_validpackage(const QString& query);
- QString make_html_form() const;
- QString make_html_tail(const QString& note = QString::null, bool with_form = true);
+ bool check_validpackage(const TQString& query);
+ TQString make_html_form() const;
+ TQString make_html_tail(const TQString& note = TQString(), bool with_form = true);
KShellProcess * p;