Browse Source

Rename KComp to avoid conflicts with KDE4

Timothy Pearson 6 years ago
parent
commit
563c545850

+ 3
- 3
kdesktop/minicli.cpp View File

@@ -243,7 +243,7 @@ void Minicli::loadConfig()
243 243
   int mode = KDesktopSettings::completionMode();
244 244
   m_dlg->cbCommand->setCompletionMode( (TDEGlobalSettings::Completion) mode );
245 245
 
246
-  KCompletionBox* box = m_dlg->cbCommand->completionBox();
246
+  TDECompletionBox* box = m_dlg->cbCommand->completionBox();
247 247
   if (box)
248 248
     box->setActivateOnSelect( false );
249 249
 
@@ -263,8 +263,8 @@ void Minicli::loadConfig()
263 263
     users << TQString::fromLocal8Bit(pw->pw_name);
264 264
   endpwent();
265 265
 
266
-  KCompletion *completion = new KCompletion;
267
-  completion->setOrder(KCompletion::Sorted);
266
+  TDECompletion *completion = new TDECompletion;
267
+  completion->setOrder(TDECompletion::Sorted);
268 268
   completion->insertItems (users);
269 269
 
270 270
   m_dlg->leUsername->setCompletionObject(completion, true);

+ 1
- 1
kicker/kicker/ui/exe_dlg.cpp View File

@@ -127,7 +127,7 @@ void PanelExeDialog::updateIcon()
127 127
 
128 128
 void PanelExeDialog::fillCompletion()
129 129
 {
130
-    KCompletion *comp = ui->m_exec->completionObject();
130
+    TDECompletion *comp = ui->m_exec->completionObject();
131 131
     TQStringList exePaths = TDEStandardDirs::systemPaths();
132 132
 
133 133
     for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); it++)

+ 1
- 1
kicker/kicker/ui/k_new_mnu.cpp View File

@@ -1227,7 +1227,7 @@ void KMenu::initialize()
1227 1227
     else
1228 1228
         m_kcommand->completionObject()->setItems( compList );
1229 1229
 
1230
-    KCompletionBox* box = m_kcommand->completionBox();
1230
+    TDECompletionBox* box = m_kcommand->completionBox();
1231 1231
     if (box)
1232 1232
         box->setActivateOnSelect( false );
1233 1233
 

+ 1
- 1
konqueror/ChangeLog View File

@@ -270,7 +270,7 @@
270 270
 Sat Nov 25 17:38:27 2000  Carsten Pfeiffer  <pfeiffer@kde.org>
271 271
 
272 272
 	* konq_mainwindow.cc: Completion handling overhauled. We have
273
-	one KonqHistoryManager, which holds a KCompletion object and syncs
273
+	one KonqHistoryManager, which holds a TDECompletion object and syncs
274 274
 	the history with the completion.
275 275
 
276 276
 	* konq_view.cc: 

+ 6
- 6
konqueror/konq_combo.cc View File

@@ -83,7 +83,7 @@ public:
83 83
     void setCompletedItems( const TQStringList& items );
84 84
 };
85 85
 
86
-class KonqComboCompletionBox : public KCompletionBox
86
+class KonqComboCompletionBox : public TDECompletionBox
87 87
 {
88 88
 public:
89 89
     KonqComboCompletionBox( TQWidget *parent, const char *name = 0 );
@@ -108,7 +108,7 @@ KonqCombo::KonqCombo( TQWidget *parent, const char *name )
108 108
 
109 109
     // We should also connect the completionBox' highlighted signal to
110 110
     // our setEditText() slot, because we're handling the signals ourselves.
111
-    // But we're lazy and let KCompletionBox do this and simply switch off
111
+    // But we're lazy and let TDECompletionBox do this and simply switch off
112 112
     // handling of signals later.
113 113
     setHandleSignals( true );
114 114
 
@@ -139,7 +139,7 @@ KonqCombo::~KonqCombo()
139 139
 {
140 140
 }
141 141
 
142
-void KonqCombo::init( KCompletion *completion )
142
+void KonqCombo::init( TDECompletion *completion )
143 143
 {
144 144
     setCompletionObject( completion, false ); //KonqMainWindow handles signals
145 145
     setAutoDeleteCompletionObject( false );
@@ -838,7 +838,7 @@ void KonqComboLineEdit::setCompletedItems( const TQStringList& items )
838 838
 ///////////////////////////////////////////////////////////////////////////////
839 839
 
840 840
 KonqComboCompletionBox::KonqComboCompletionBox( TQWidget *parent, const char *name )
841
-                       :KCompletionBox( parent, name ) {}
841
+                       :TDECompletionBox( parent, name ) {}
842 842
 
843 843
 void KonqComboCompletionBox::setItems( const TQStringList& items )
844 844
 {
@@ -889,9 +889,9 @@ void KonqComboCompletionBox::setItems( const TQStringList& items )
889 889
 
890 890
     blockSignals( block );
891 891
 
892
-    // Trigger d->down_workaround = true within KCompletionBox
892
+    // Trigger d->down_workaround = true within TDECompletionBox
893 893
     TQStringList dummy;
894
-    KCompletionBox::insertItems( dummy, 1 );
894
+    TDECompletionBox::insertItems( dummy, 1 );
895 895
 }
896 896
 
897 897
 void KonqComboCompletionBox::insertStringList( const TQStringList & list, int index )

+ 2
- 2
konqueror/konq_combo.h View File

@@ -25,7 +25,7 @@
25 25
 #include <kcombobox.h>
26 26
 #include <konq_historymgr.h>
27 27
 
28
-class KCompletion;
28
+class TDECompletion;
29 29
 class TDEConfig;
30 30
 
31 31
 // we use KHistoryCombo _only_ for the up/down keyboard handling, otherwise
@@ -39,7 +39,7 @@ public:
39 39
     ~KonqCombo();
40 40
 
41 41
     // initializes with the completion object and calls loadItems()
42
-    void init( KCompletion * );
42
+    void init( TDECompletion * );
43 43
 
44 44
     // determines internally if it's temporary or final
45 45
     void setURL( const TQString& url );

+ 16
- 16
konqueror/konq_mainwindow.cc View File

@@ -123,7 +123,7 @@ template class TQPtrList<TDEToggleAction>;
123 123
 
124 124
 TQPtrList<KonqMainWindow> *KonqMainWindow::s_lstViews = 0;
125 125
 TDEConfig * KonqMainWindow::s_comboConfig = 0;
126
-KCompletion * KonqMainWindow::s_pCompletion = 0;
126
+TDECompletion * KonqMainWindow::s_pCompletion = 0;
127 127
 TQFile * KonqMainWindow::s_crashlog_file = 0;
128 128
 bool KonqMainWindow::s_preloaded = false;
129 129
 KonqMainWindow* KonqMainWindow::s_preloadedWindow = 0;
@@ -3287,8 +3287,8 @@ void KonqMainWindow::initCombo()
3287 3287
            TQT_SLOT( slotMakeCompletion( const TQString& )));
3288 3288
   connect( m_combo, TQT_SIGNAL( substringCompletion( const TQString& )),
3289 3289
            TQT_SLOT( slotSubstringcompletion( const TQString& )));
3290
-  connect( m_combo, TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType) ),
3291
-           TQT_SLOT( slotRotation( KCompletionBase::KeyBindingType )));
3290
+  connect( m_combo, TQT_SIGNAL( textRotation( TDECompletionBase::KeyBindingType) ),
3291
+           TQT_SLOT( slotRotation( TDECompletionBase::KeyBindingType )));
3292 3292
   connect( m_combo, TQT_SIGNAL( cleared() ),
3293 3293
            TQT_SLOT ( slotClearHistory() ) );
3294 3294
   connect( m_pURLCompletion, TQT_SIGNAL( match(const TQString&) ),
@@ -3382,17 +3382,17 @@ void KonqMainWindow::slotSubstringcompletion( const TQString& text )
3382 3382
     m_combo->setCompletedItems( items );
3383 3383
 }
3384 3384
 
3385
-void KonqMainWindow::slotRotation( KCompletionBase::KeyBindingType type )
3385
+void KonqMainWindow::slotRotation( TDECompletionBase::KeyBindingType type )
3386 3386
 {
3387 3387
   // Tell slotMatch() to do nothing
3388 3388
   m_urlCompletionStarted = false;
3389 3389
 
3390
-  bool prev = (type == KCompletionBase::PrevCompletionMatch);
3391
-  if ( prev || type == KCompletionBase::NextCompletionMatch ) {
3390
+  bool prev = (type == TDECompletionBase::PrevCompletionMatch);
3391
+  if ( prev || type == TDECompletionBase::NextCompletionMatch ) {
3392 3392
     TQString completion = prev ? m_pURLCompletion->previousMatch() :
3393 3393
                                 m_pURLCompletion->nextMatch();
3394 3394
 
3395
-    if( completion.isNull() ) { // try the history KCompletion object
3395
+    if( completion.isNull() ) { // try the history TDECompletion object
3396 3396
         completion = prev ? s_pCompletion->previousMatch() :
3397 3397
                             s_pCompletion->nextMatch();
3398 3398
     }
@@ -5550,10 +5550,10 @@ static TQString hp_tryPrepend( const TQString& s )
5550 5550
 }
5551 5551
 
5552 5552
 
5553
-static void hp_removeDupe( KCompletionMatches& l, const TQString& dupe,
5554
-    KCompletionMatches::Iterator it_orig )
5553
+static void hp_removeDupe( TDECompletionMatches& l, const TQString& dupe,
5554
+    TDECompletionMatches::Iterator it_orig )
5555 5555
 {
5556
-    for( KCompletionMatches::Iterator it = l.begin();
5556
+    for( TDECompletionMatches::Iterator it = l.begin();
5557 5557
          it != l.end();
5558 5558
          ) {
5559 5559
         if( it == it_orig ) {
@@ -5572,14 +5572,14 @@ static void hp_removeDupe( KCompletionMatches& l, const TQString& dupe,
5572 5572
 // remove duplicates like 'http://www.kde.org' and 'http://www.kde.org/'
5573 5573
 // (i.e. the trailing slash)
5574 5574
 // some duplicates are also created by prepending protocols
5575
-static void hp_removeDuplicates( KCompletionMatches& l )
5575
+static void hp_removeDuplicates( TDECompletionMatches& l )
5576 5576
 {
5577 5577
     TQString http = "http://";
5578 5578
     TQString ftp = "ftp://ftp.";
5579 5579
     TQString file = "file:";
5580 5580
     TQString file2 = "file://";
5581 5581
     l.removeDuplicates();
5582
-    for( KCompletionMatches::Iterator it = l.begin();
5582
+    for( TDECompletionMatches::Iterator it = l.begin();
5583 5583
          it != l.end();
5584 5584
          ++it ) {
5585 5585
         TQString str = (*it).value();
@@ -5602,9 +5602,9 @@ static void hp_removeDuplicates( KCompletionMatches& l )
5602 5602
     }
5603 5603
 }
5604 5604
 
5605
-static void hp_removeCommonPrefix( KCompletionMatches& l, const TQString& prefix )
5605
+static void hp_removeCommonPrefix( TDECompletionMatches& l, const TQString& prefix )
5606 5606
 {
5607
-    for( KCompletionMatches::Iterator it = l.begin();
5607
+    for( TDECompletionMatches::Iterator it = l.begin();
5608 5608
          it != l.end();
5609 5609
          ) {
5610 5610
         if( (*it).value().startsWith( prefix )) {
@@ -5617,7 +5617,7 @@ static void hp_removeCommonPrefix( KCompletionMatches& l, const TQString& prefix
5617 5617
 
5618 5618
 // don't include common prefixes like 'http://', i.e. when s == 'h', include
5619 5619
 // http://hotmail.com but don't include everything just starting with 'http://'
5620
-static void hp_checkCommonPrefixes( KCompletionMatches& matches, const TQString& s )
5620
+static void hp_checkCommonPrefixes( TDECompletionMatches& matches, const TQString& s )
5621 5621
 {
5622 5622
     static const char* const prefixes[] = {
5623 5623
         "http://",
@@ -5652,7 +5652,7 @@ TQStringList KonqMainWindow::historyPopupCompletionItems( const TQString& s)
5652 5652
     const TQString file2 = "file://";
5653 5653
     if( s.isEmpty())
5654 5654
 	    return TQStringList();
5655
-    KCompletionMatches matches= s_pCompletion->allWeightedMatches( s );
5655
+    TDECompletionMatches matches= s_pCompletion->allWeightedMatches( s );
5656 5656
     hp_checkCommonPrefixes( matches, s );
5657 5657
     bool checkDuplicates = false;
5658 5658
     if ( !s.startsWith( ftp ) ) {

+ 2
- 2
konqueror/konq_mainwindow.h View File

@@ -494,7 +494,7 @@ protected slots:
494 494
   void slotCompletionModeChanged( TDEGlobalSettings::Completion );
495 495
   void slotMakeCompletion( const TQString& );
496 496
   void slotSubstringcompletion( const TQString& );
497
-  void slotRotation( KCompletionBase::KeyBindingType );
497
+  void slotRotation( TDECompletionBase::KeyBindingType );
498 498
   void slotMatch( const TQString& );
499 499
   void slotClearHistory();
500 500
   void slotClearComboHistory();
@@ -730,7 +730,7 @@ private:
730 730
   static TDEConfig *s_comboConfig;
731 731
   KURLCompletion *m_pURLCompletion;
732 732
   // just a reference to KonqHistoryManager's completionObject
733
-  static KCompletion *s_pCompletion;
733
+  static TDECompletion *s_pCompletion;
734 734
 
735 735
   ToggleViewGUIClient *m_toggleViewGUIClient;
736 736
 

+ 4
- 4
libkonq/konq_historymgr.cc View File

@@ -55,8 +55,8 @@ KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name )
55 55
 
56 56
 
57 57
     // take care of the completion object
58
-    m_pCompletion = new KCompletion;
59
-    m_pCompletion->setOrder( KCompletion::Weighted );
58
+    m_pCompletion = new TDECompletion;
59
+    m_pCompletion->setOrder( TDECompletion::Weighted );
60 60
 
61 61
     // and load the history
62 62
     loadHistory();
@@ -619,10 +619,10 @@ bool KonqHistoryManager::loadFallback()
619 619
 
620 620
 // tries to create a small KonqHistoryEntry out of a string, where the string
621 621
 // looks like "http://www.bla.com/bla.html:23"
622
-// the attached :23 is the weighting from KCompletion
622
+// the attached :23 is the weighting from TDECompletion
623 623
 KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const TQString& item) const
624 624
 {
625
-    // code taken from KCompletion::addItem(), adjusted to use weight = 1
625
+    // code taken from TDECompletion::addItem(), adjusted to use weight = 1
626 626
     uint len = item.length();
627 627
     uint weight = 1;
628 628
 

+ 5
- 5
libkonq/konq_historymgr.h View File

@@ -37,7 +37,7 @@
37 37
 
38 38
 #include <libkonq_export.h>
39 39
 
40
-class KCompletion;
40
+class TDECompletion;
41 41
 
42 42
 
43 43
 typedef TQPtrList<KonqHistoryEntry> KonqBaseHistoryList;
@@ -69,7 +69,7 @@ protected:
69 69
  * Konqueror instance. Additionally it synchronizes the history with other
70 70
  * Konqueror instances via DCOP to keep one global and persistant history.
71 71
  *
72
- * It keeps the history in sync with one KCompletion object
72
+ * It keeps the history in sync with one TDECompletion object
73 73
  */
74 74
 class LIBKONQ_EXPORT KonqHistoryManager : public KParts::HistoryProvider,
75 75
 			   public KonqHistoryComm
@@ -164,9 +164,9 @@ public:
164 164
     void removePending( const KURL& url );
165 165
 
166 166
     /**
167
-     * @returns the KCompletion object.
167
+     * @returns the TDECompletion object.
168 168
      */
169
-    KCompletion * completionObject() const { return m_pCompletion; }
169
+    TDECompletion * completionObject() const { return m_pCompletion; }
170 170
 
171 171
     /**
172 172
      * @returns the list of all history entries, sorted by date
@@ -370,7 +370,7 @@ private:
370 370
     TQ_UINT32 m_maxCount;   // maximum of history entries
371 371
     TQ_UINT32 m_maxAgeDays; // maximum age of a history entry
372 372
 
373
-    KCompletion *m_pCompletion; // the completion object we sync with
373
+    TDECompletion *m_pCompletion; // the completion object we sync with
374 374
 
375 375
     /**
376 376
      * A timer that will emit the KParts::HistoryProvider::updated() signal

+ 1
- 1
tdmlib/kgreet_classic.cpp View File

@@ -176,7 +176,7 @@ KClassicGreeter::~KClassicGreeter()
176 176
 void // virtual
177 177
 KClassicGreeter::loadUsers( const TQStringList &users )
178 178
 {
179
-	KCompletion *userNamesCompletion = new KCompletion;
179
+	TDECompletion *userNamesCompletion = new TDECompletion;
180 180
 	userNamesCompletion->setItems( users );
181 181
 	loginEdit->setCompletionObject( userNamesCompletion );
182 182
 	loginEdit->setAutoDeleteCompletionObject( true );

+ 1
- 1
tdmlib/kgreet_pam.cpp View File

@@ -219,7 +219,7 @@ KPamGreeter::~KPamGreeter()
219 219
 void // virtual
220 220
 KPamGreeter::loadUsers( const TQStringList &users )
221 221
 {
222
-	KCompletion *userNamesCompletion = new KCompletion;
222
+	TDECompletion *userNamesCompletion = new TDECompletion;
223 223
 	userNamesCompletion->setItems( users );
224 224
 	loginEdit->setCompletionObject( userNamesCompletion );
225 225
 	loginEdit->setAutoDeleteCompletionObject( true );

+ 1
- 1
tdmlib/kgreet_winbind.cpp View File

@@ -243,7 +243,7 @@ void // virtual
243 243
 KWinbindGreeter::loadUsers( const TQStringList &users )
244 244
 {
245 245
 	allUsers = users;
246
-	KCompletion *userNamesCompletion = new KCompletion;
246
+	TDECompletion *userNamesCompletion = new TDECompletion;
247 247
 	loginEdit->setCompletionObject( userNamesCompletion );
248 248
 	loginEdit->setAutoDeleteCompletionObject( true );
249 249
 	loginEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto );

Loading…
Cancel
Save