summaryrefslogtreecommitdiffabout
path: root/microkde/kio
Unidiff
Diffstat (limited to 'microkde/kio') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp10
-rw-r--r--microkde/kio/kfile/kurlrequester.h4
-rw-r--r--microkde/kio/kio/kdirwatch.cpp12
-rw-r--r--microkde/kio/kio/kdirwatch_p.h10
4 files changed, 20 insertions, 16 deletions
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp
index ca94570..ce62da7 100644
--- a/microkde/kio/kfile/kurlrequester.cpp
+++ b/microkde/kio/kfile/kurlrequester.cpp
@@ -24,12 +24,14 @@
24#include <unistd.h> 24#include <unistd.h>
25#endif 25#endif
26#include <qstring.h> 26#include <qstring.h>
27//US #include <qtooltip.h> 27//US #include <qtooltip.h>
28 28
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30//Added by qt3to4:
31#include <QPixmap>
30 32
31//US #include <kaccel.h> 33//US #include <kaccel.h>
32//US #include <kcombobox.h> 34//US #include <kcombobox.h>
33#include <kdebug.h> 35#include <kdebug.h>
34#include <kdialog.h> 36#include <kdialog.h>
35#include <kfiledialog.h> 37#include <kfiledialog.h>
@@ -179,22 +181,22 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
179 181
180 init(); 182 init();
181} 183}
182*/ 184*/
183 185
184KURLRequester::KURLRequester( QWidget *parent, const char *name ) 186KURLRequester::KURLRequester( QWidget *parent, const char *name )
185 : QHBox( parent, name ) 187 : Q3HBox( parent, name )
186{ 188{
187 d = new KURLRequesterPrivate; 189 d = new KURLRequesterPrivate;
188 init(); 190 init();
189} 191}
190 192
191 193
192KURLRequester::KURLRequester( const QString& url, QWidget *parent, 194KURLRequester::KURLRequester( const QString& url, QWidget *parent,
193 const char *name ) 195 const char *name )
194 : QHBox( parent, name ) 196 : Q3HBox( parent, name )
195{ 197{
196 d = new KURLRequesterPrivate; 198 d = new KURLRequesterPrivate;
197 init(); 199 init();
198 setURL( url ); 200 setURL( url );
199} 201}
200 202
@@ -213,14 +215,14 @@ void KURLRequester::init()
213 myShowLocalProt = false; 215 myShowLocalProt = false;
214 mPathIsDir = false; 216 mPathIsDir = false;
215 if (/*US !d->combo && */ !d->edit ) 217 if (/*US !d->combo && */ !d->edit )
216 d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); 218 d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" );
217 219
218 myButton = new KURLDragPushButton( this, "kfile button"); 220 myButton = new KURLDragPushButton( this, "kfile button");
219 QIconSet iconSet = SmallIconSet("fileopen"); 221 QIcon iconSet = SmallIconSet("fileopen");
220 QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); 222 QPixmap pixMap = iconSet.pixmap( QIcon::Small, QIcon::Normal );
221 myButton->setIconSet( iconSet ); 223 myButton->setIconSet( iconSet );
222 myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); 224 myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
223//US QToolTip::add(myButton, i18n("Open file dialog")); 225//US QToolTip::add(myButton, i18n("Open file dialog"));
224 226
225 connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() )); 227 connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() ));
226 228
diff --git a/microkde/kio/kfile/kurlrequester.h b/microkde/kio/kfile/kurlrequester.h
index faa3326..5d4fa11 100644
--- a/microkde/kio/kfile/kurlrequester.h
+++ b/microkde/kio/kfile/kurlrequester.h
@@ -17,13 +17,13 @@
17*/ 17*/
18 18
19 19
20#ifndef KURLREQUESTER_H 20#ifndef KURLREQUESTER_H
21#define KURLREQUESTER_H 21#define KURLREQUESTER_H
22 22
23#include <qhbox.h> 23#include <q3hbox.h>
24 24
25#include <keditlistbox.h> 25#include <keditlistbox.h>
26//US #include <kfile.h> 26//US #include <kfile.h>
27//US #include <kpushbutton.h> 27//US #include <kpushbutton.h>
28#include <kurl.h> 28#include <kurl.h>
29 29
@@ -50,13 +50,13 @@ class QTimer;
50 * 50 *
51 * You can change this behavior by using @ref setMode() or @ref setFilter(). 51 * You can change this behavior by using @ref setMode() or @ref setFilter().
52 * 52 *
53 * @short A widget to request a filename/url from the user 53 * @short A widget to request a filename/url from the user
54 * @author Carsten Pfeiffer <pfeiffer@kde.org> 54 * @author Carsten Pfeiffer <pfeiffer@kde.org>
55 */ 55 */
56class KURLRequester : public QHBox 56class KURLRequester : public Q3HBox
57{ 57{
58 Q_OBJECT 58 Q_OBJECT
59 Q_PROPERTY( QString url READ url WRITE setURL ) 59 Q_PROPERTY( QString url READ url WRITE setURL )
60 60
61public: 61public:
62 /** 62 /**
diff --git a/microkde/kio/kio/kdirwatch.cpp b/microkde/kio/kio/kdirwatch.cpp
index 1596d1f..5f07c54 100644
--- a/microkde/kio/kio/kdirwatch.cpp
+++ b/microkde/kio/kio/kdirwatch.cpp
@@ -49,17 +49,19 @@ $Id$
49#endif 49#endif
50 50
51#include <sys/stat.h> 51#include <sys/stat.h>
52#include <assert.h> 52#include <assert.h>
53#include <qdir.h> 53#include <qdir.h>
54#include <qfile.h> 54#include <qfile.h>
55#include <qintdict.h> 55#include <q3intdict.h>
56#include <qptrlist.h> 56#include <q3ptrlist.h>
57#include <qsocketnotifier.h> 57#include <qsocketnotifier.h>
58#include <qstringlist.h> 58#include <qstringlist.h>
59#include <qtimer.h> 59#include <qtimer.h>
60//Added by qt3to4:
61#include <Q3CString>
60 62
61#include <kapplication.h> 63#include <kapplication.h>
62#include <kdebug.h> 64#include <kdebug.h>
63#include <kconfig.h> 65#include <kconfig.h>
64#include <kconfigbase.h> 66#include <kconfigbase.h>
65#include <kglobal.h> 67#include <kglobal.h>
@@ -181,13 +183,13 @@ KDirWatchPrivate::KDirWatchPrivate()
181 m_ref = 0; 183 m_ref = 0;
182 184
183//US KConfigGroup config(KGlobal::config(), QCString("DirWatch")); 185//US KConfigGroup config(KGlobal::config(), QCString("DirWatch"));
184//US m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000); 186//US m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000);
185//US m_PollInterval = config.readNumEntry("PollInterval", 500); 187//US m_PollInterval = config.readNumEntry("PollInterval", 500);
186 KConfig *config = KGlobal::config(); 188 KConfig *config = KGlobal::config();
187 KConfigGroupSaver saver( config, QCString("DirWatch") ); 189 KConfigGroupSaver saver( config, Q3CString("DirWatch") );
188 190
189 m_nfsPollInterval = config->readNumEntry("NFSPollInterval", 5000); 191 m_nfsPollInterval = config->readNumEntry("NFSPollInterval", 5000);
190 m_PollInterval = config->readNumEntry("PollInterval", 500); 192 m_PollInterval = config->readNumEntry("PollInterval", 500);
191 193
192 194
193 QString available("Stat"); 195 QString available("Stat");
@@ -728,13 +730,13 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
728 730
729/* Called from KDirWatch destructor: 731/* Called from KDirWatch destructor:
730 * remove <instance> as client from all entries 732 * remove <instance> as client from all entries
731 */ 733 */
732void KDirWatchPrivate::removeEntries( KDirWatch* instance ) 734void KDirWatchPrivate::removeEntries( KDirWatch* instance )
733{ 735{
734 QPtrList<Entry> list; 736 Q3PtrList<Entry> list;
735 int minfreq = 3600000; 737 int minfreq = 3600000;
736 738
737 // put all entries where instance is a client in list 739 // put all entries where instance is a client in list
738 EntryMap::Iterator it = m_mapEntries.begin(); 740 EntryMap::Iterator it = m_mapEntries.begin();
739 for( ; it != m_mapEntries.end(); ++it ) { 741 for( ; it != m_mapEntries.end(); ++it ) {
740 Client* c = (*it).m_clients.first(); 742 Client* c = (*it).m_clients.first();
@@ -1004,13 +1006,13 @@ void KDirWatchPrivate::slotRescan()
1004 1006
1005 // We delay deletions of entries this way. 1007 // We delay deletions of entries this way.
1006 // removeDir(), when called in slotDirty(), can cause a crash otherwise 1008 // removeDir(), when called in slotDirty(), can cause a crash otherwise
1007 delayRemove = true; 1009 delayRemove = true;
1008 1010
1009#ifdef HAVE_DNOTIFY 1011#ifdef HAVE_DNOTIFY
1010 QPtrList<Entry> dList, cList; 1012 Q3PtrList<Entry> dList, cList;
1011 1013
1012 // for DNotify method, 1014 // for DNotify method,
1013 if (rescan_all) 1015 if (rescan_all)
1014 { 1016 {
1015 // mark all as dirty 1017 // mark all as dirty
1016 it = m_mapEntries.begin(); 1018 it = m_mapEntries.begin();
diff --git a/microkde/kio/kio/kdirwatch_p.h b/microkde/kio/kio/kdirwatch_p.h
index 0ab482f..be74f2a 100644
--- a/microkde/kio/kio/kdirwatch_p.h
+++ b/microkde/kio/kio/kdirwatch_p.h
@@ -15,13 +15,13 @@ $Id$
15#define _KDIRWATCH_P_H 15#define _KDIRWATCH_P_H
16 16
17#ifdef HAVE_FAM 17#ifdef HAVE_FAM
18#include <fam.h> 18#include <fam.h>
19#endif 19#endif
20 20
21#include <qptrlist.h> 21#include <q3ptrlist.h>
22 22
23#include <kdirwatch.h> 23#include <kdirwatch.h>
24 24
25#include <ctime> 25#include <ctime>
26 26
27#define invalid_ctime ((time_t)-1) 27#define invalid_ctime ((time_t)-1)
@@ -55,15 +55,15 @@ public:
55 // the last observed link count 55 // the last observed link count
56 int m_nlink; 56 int m_nlink;
57 entryStatus m_status; 57 entryStatus m_status;
58 entryMode m_mode; 58 entryMode m_mode;
59 bool isDir; 59 bool isDir;
60 // instances interested in events 60 // instances interested in events
61 QPtrList<Client> m_clients; 61 Q3PtrList<Client> m_clients;
62 // nonexistent entries of this directory 62 // nonexistent entries of this directory
63 QPtrList<Entry> m_entries; 63 Q3PtrList<Entry> m_entries;
64 QString path; 64 QString path;
65 65
66 int msecLeft, freq; 66 int msecLeft, freq;
67 67
68 void addClient(KDirWatch*); 68 void addClient(KDirWatch*);
69 void removeClient(KDirWatch*); 69 void removeClient(KDirWatch*);
@@ -121,13 +121,13 @@ private:
121 int statEntries; 121 int statEntries;
122 int m_nfsPollInterval, m_PollInterval; 122 int m_nfsPollInterval, m_PollInterval;
123 int m_ref; 123 int m_ref;
124 bool useStat(Entry*); 124 bool useStat(Entry*);
125 125
126 bool delayRemove; 126 bool delayRemove;
127 QPtrList<Entry> removeList; 127 Q3PtrList<Entry> removeList;
128 128
129#ifdef HAVE_FAM 129#ifdef HAVE_FAM
130 QSocketNotifier *sn; 130 QSocketNotifier *sn;
131 FAMConnection fc; 131 FAMConnection fc;
132 bool use_fam; 132 bool use_fam;
133 133
@@ -138,13 +138,13 @@ private:
138#ifdef HAVE_DNOTIFY 138#ifdef HAVE_DNOTIFY
139 bool supports_dnotify; 139 bool supports_dnotify;
140 bool rescan_all; 140 bool rescan_all;
141 int mPipe[2]; 141 int mPipe[2];
142 QTimer mTimer; 142 QTimer mTimer;
143 QSocketNotifier *mSn; 143 QSocketNotifier *mSn;
144 QIntDict<Entry> fd_Entry; 144 Q3IntDict<Entry> fd_Entry;
145 145
146 static void dnotify_handler(int, siginfo_t *si, void *); 146 static void dnotify_handler(int, siginfo_t *si, void *);
147 static void dnotify_sigio_handler(int, siginfo_t *si, void *); 147 static void dnotify_sigio_handler(int, siginfo_t *si, void *);
148 bool useDNotify(Entry*); 148 bool useDNotify(Entry*);
149#endif 149#endif
150}; 150};