Browse Source

Rename KApplication to TDEApplication to avoid conflicts with KDE4

tags/r14.0.0
Timothy Pearson 6 years ago
parent
commit
85fc36f10e
7 changed files with 45 additions and 45 deletions
  1. 13
    13
      acinclude.m4
  2. 7
    7
      krename/ProgressDialog.cpp
  3. 1
    1
      krename/coorddialog.cpp
  4. 12
    12
      krename/kmylistbox.cpp
  5. 10
    10
      krename/krenameimpl.cpp
  6. 1
    1
      krename/main.cpp
  7. 1
    1
      krename/threadedlister.cpp

+ 13
- 13
acinclude.m4 View File

@@ -1979,20 +1979,20 @@ cat > conftest.$ac_ext <<EOF
1979 1979
 #include <kapp.h>
1980 1980
 
1981 1981
 int main() {
1982
-    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1983
-    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1984
-    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1985
-    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1986
-    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1987
-    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1988
-    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1989
-    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1990
-    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1991
-    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1982
+    printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data());
1983
+    printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data());
1984
+    printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data());
1985
+    printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data());
1986
+    printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data());
1987
+    printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data());
1988
+    printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data());
1989
+    printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data());
1990
+    printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data());
1991
+    printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data());
1992 1992
     printf("kde_wallpaperdir=\\"%s\\"\n",
1993
-	KApplication::kde_wallpaperdir().data());
1994
-    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1995
-    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1993
+	TDEApplication::kde_wallpaperdir().data());
1994
+    printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data());
1995
+    printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data());
1996 1996
     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1997 1997
     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1998 1998
     printf("kde_moduledir=\\"/tmp/dummy\\"\n");

+ 7
- 7
krename/ProgressDialog.cpp View File

@@ -135,7 +135,7 @@ void ProgressDialog::print( TQString text, TQString pixmap )
135 135
 {
136 136
     if( !m_timer->isActive() )
137 137
     {
138
-        KApplication::setOverrideCursor( TQt::waitCursor );
138
+        TDEApplication::setOverrideCursor( TQt::waitCursor );
139 139
         m_timer->start( TIMER_INTERVAL );
140 140
     }
141 141
     
@@ -152,7 +152,7 @@ void ProgressDialog::error( TQString text )
152 152
 {
153 153
     if( !m_timer->isActive() )
154 154
     {
155
-        KApplication::setOverrideCursor( TQt::waitCursor );
155
+        TDEApplication::setOverrideCursor( TQt::waitCursor );
156 156
         m_timer->start( TIMER_INTERVAL );
157 157
     }
158 158
     
@@ -166,7 +166,7 @@ void ProgressDialog::warning( TQString text )
166 166
 {
167 167
     if( !m_timer->isActive() )
168 168
     {
169
-        KApplication::setOverrideCursor( TQt::waitCursor );
169
+        TDEApplication::setOverrideCursor( TQt::waitCursor );
170 170
         m_timer->start( TIMER_INTERVAL );
171 171
     }
172 172
     
@@ -177,13 +177,13 @@ void ProgressDialog::warning( TQString text )
177 177
 
178 178
 void ProgressDialog::quitAll()
179 179
 {
180
-    KApplication::exit(0);
180
+    TDEApplication::exit(0);
181 181
 }
182 182
 
183 183
 void ProgressDialog::done( int errors, int successfull, bool allowundo )
184 184
 {
185 185
     m_timer->stop();
186
-    KApplication::restoreOverrideCursor();
186
+    TDEApplication::restoreOverrideCursor();
187 187
 
188 188
     display->setUpdatesEnabled( true );
189 189
     display->setSorting( 1, true );
@@ -301,7 +301,7 @@ void ProgressDialog::undo()
301 301
     FileOperation fop;
302 302
     
303 303
     m_timer->start( TIMER_INTERVAL );
304
-    KApplication::setOverrideCursor( TQt::waitCursor );
304
+    TDEApplication::setOverrideCursor( TQt::waitCursor );
305 305
     for( unsigned int i = 0; i < m_size; i++ )
306 306
     {
307 307
         setProgress( i );
@@ -339,7 +339,7 @@ void ProgressDialog::undo()
339 339
     
340 340
     print( i18n("Undoing the renaming operation has been completed."), "undo" );
341 341
     m_timer->stop();
342
-    KApplication::restoreOverrideCursor();
342
+    TDEApplication::restoreOverrideCursor();
343 343
         
344 344
     TQWidget* krename = KRenameImpl::launch( TQRect( 0, 0, 0, 0 ), list );
345 345
     krename->show();

+ 1
- 1
krename/coorddialog.cpp View File

@@ -80,7 +80,7 @@ CoordDialog::CoordDialog( const TQString & file, TQWidget *_parent, const char *
80 80
     int w = fm.width( file );
81 81
     if( w > width() )
82 82
         resize(
83
-            ( w < KApplication::desktop()->width() - 40 ? w + 40 : KApplication::desktop()->width() ), height() );
83
+            ( w < TDEApplication::desktop()->width() - 40 ? w + 40 : TDEApplication::desktop()->width() ), height() );
84 84
 }
85 85
 
86 86
 CoordDialog::~CoordDialog()

+ 12
- 12
krename/kmylistbox.cpp View File

@@ -140,13 +140,13 @@ void KMyListBox::addDir( const KURL & dirname, const TQString & filter, bool hid
140 140
     thl->setHidden( hidden );
141 141
     thl->setRecursive( recursively );
142 142
     
143
-    KApplication::setOverrideCursor( TQt::waitCursor );
143
+    TDEApplication::setOverrideCursor( TQt::waitCursor );
144 144
     thl->start();
145 145
 }
146 146
 
147 147
 void KMyListBox::addDirName( const KURL & dirname, const TQString & filter, bool hidden, bool recursive )
148 148
 {
149
-    KApplication::setOverrideCursor( TQt::waitCursor );            
149
+    TDEApplication::setOverrideCursor( TQt::waitCursor );            
150 150
 
151 151
     if( recursive ) {
152 152
         ThreadedLister* thl = new ThreadedLister( &m_add_mutex, &m_running_lister_counter, this );
@@ -178,7 +178,7 @@ void KMyListBox::dropEvent(TQDropEvent* e)
178 178
     if( KURLDrag::decode( e, list ) )
179 179
     {
180 180
         
181
-        KApplication::setOverrideCursor( TQt::waitCursor );
181
+        TDEApplication::setOverrideCursor( TQt::waitCursor );
182 182
 
183 183
         setUpdatesEnabled( false );
184 184
 
@@ -213,7 +213,7 @@ void KMyListBox::viewportMousePressEvent( TQMouseEvent* e )
213 213
 
214 214
 void KMyListBox::viewportMouseMoveEvent( TQMouseEvent* e )
215 215
 {
216
-    if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > KApplication::startDragDistance() ) {
216
+    if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > TDEApplication::startDragDistance() ) {
217 217
         mousePressed = FALSE;
218 218
         TQListBoxItem *item = itemAt( presspos );
219 219
         if ( item ) {
@@ -297,7 +297,7 @@ void KMyListBox::moveMode()
297 297
 {
298 298
     if ( !moving ) {
299 299
         moving = true;
300
-        KApplication::setOverrideCursor( TQt::sizeAllCursor );
300
+        TDEApplication::setOverrideCursor( TQt::sizeAllCursor );
301 301
     }
302 302
 }
303 303
 
@@ -338,7 +338,7 @@ void KMyListBox::preview( KURL::List list )
338 338
     connect( job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap &) ), this, TQT_SLOT( previewDone( const KFileItem*, const TQPixmap &) ) );
339 339
     connect( job, TQT_SIGNAL( failed( const KFileItem*)), this, TQT_SLOT( previewFailed( const KFileItem* ) ));
340 340
     connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( previewFinished() ) );
341
-    KApplication::setOverrideCursor( TQt::waitCursor );
341
+    TDEApplication::setOverrideCursor( TQt::waitCursor );
342 342
 }
343 343
 
344 344
 void KMyListBox::previewDone( const KFileItem* item, const TQPixmap &pixmap )
@@ -369,7 +369,7 @@ void KMyListBox::previewFailed( const KFileItem* item )
369 369
 void KMyListBox::previewFinished()
370 370
 {
371 371
     triggerUpdate( true ); //maybe false is enough
372
-    KApplication::restoreOverrideCursor();
372
+    TDEApplication::restoreOverrideCursor();
373 373
 }
374 374
 
375 375
 void KMyListBox::setPreview( bool prv )
@@ -401,7 +401,7 @@ void KMyListBox::setName( bool name )
401 401
 
402 402
 void KMyListBox::move( int i )
403 403
 {
404
-    KApplication::restoreOverrideCursor();
404
+    TDEApplication::restoreOverrideCursor();
405 405
     moving = false;
406 406
 
407 407
     if( !count() )
@@ -505,7 +505,7 @@ void KMyListBox::listerDone( ThreadedLister* lister )
505 505
  
506 506
     if( lister )   
507 507
         delete lister;
508
-    KApplication::restoreOverrideCursor();
508
+    TDEApplication::restoreOverrideCursor();
509 509
     
510 510
     setUpdatesEnabled( false );
511 511
     setPreview( KMyListBoxItem::preview() );
@@ -566,7 +566,7 @@ void KMyListBox::sortNummeric()
566 566
 
567 567
 void KMyListBox::sortList()
568 568
 {
569
-    KApplication::setOverrideCursor( TQt::WaitCursor );
569
+    TDEApplication::setOverrideCursor( TQt::WaitCursor );
570 570
 
571 571
     if( m_sorting == ASCENDING )
572 572
         sort( true );
@@ -577,7 +577,7 @@ void KMyListBox::sortList()
577 577
         unsigned int p = 0;
578 578
         for( unsigned int i = 0;i<count();i++)
579 579
         {
580
-            p = KApplication::random() % count();
580
+            p = TDEApplication::random() % count();
581 581
             if( p != i ) // This prevents the creation of a new ListBoxItem
582 582
                          // on the same position as before. It would not change
583 583
                          // the position of item, but cost a little bit of speed
@@ -612,7 +612,7 @@ void KMyListBox::sortList()
612 612
             }
613 613
     }
614 614
 
615
-    KApplication::restoreOverrideCursor();
615
+    TDEApplication::restoreOverrideCursor();
616 616
 }
617 617
 
618 618
 void KMyListBox::setSorting( int s )

+ 10
- 10
krename/krenameimpl.cpp View File

@@ -165,7 +165,7 @@ void KRenameImpl::setup( bool wizardmode )
165 165
     // Load Configuration
166 166
     loadConfig();
167 167
     page_1->setEnabled( true );
168
-    KApplication::restoreOverrideCursor();
168
+    TDEApplication::restoreOverrideCursor();
169 169
         
170 170
     filename->setText( "$" );   // no i18n() ! ;)
171 171
     extemplate->setText( "$" );
@@ -1244,9 +1244,9 @@ void KRenameImpl::updatePreview()
1244 1244
     BatchRenamer b;
1245 1245
     if( setupBatchRenamer( &b, true ) )
1246 1246
     {
1247
-        KApplication::setOverrideCursor( TQt::WaitCursor );
1247
+        TDEApplication::setOverrideCursor( TQt::WaitCursor );
1248 1248
         b.createPreview( preview );
1249
-        KApplication::restoreOverrideCursor();
1249
+        TDEApplication::restoreOverrideCursor();
1250 1250
     }
1251 1251
     preview->horizontalScrollBar()->setValue( h );
1252 1252
     preview->verticalScrollBar()->setValue( v );
@@ -1307,7 +1307,7 @@ void KRenameImpl::loadConfig()
1307 1307
 
1308 1308
     //parent->show();
1309 1309
     page_1->setEnabled( false );
1310
-    KApplication::setOverrideCursor( TQt::WaitCursor );
1310
+    TDEApplication::setOverrideCursor( TQt::WaitCursor );
1311 1311
     plugin->loadPlugins( m_loadplugins );
1312 1312
     setupTab1();
1313 1313
     config->setGroup("GUISettings");
@@ -1359,20 +1359,20 @@ void KRenameImpl::replace()
1359 1359
 
1360 1360
 void KRenameImpl::toggleImagePreview()
1361 1361
 {
1362
-    KApplication::setOverrideCursor( TQt::waitCursor );
1362
+    TDEApplication::setOverrideCursor( TQt::waitCursor );
1363 1363
     fileList->setPreview( checkPreview->isChecked() );
1364 1364
     checkName->setEnabled( checkPreview->isChecked() );
1365 1365
     if( !checkPreview->isChecked() )
1366 1366
         checkName->setChecked( true );
1367 1367
     fileList->setName( checkName->isChecked() );
1368
-    KApplication::restoreOverrideCursor();
1368
+    TDEApplication::restoreOverrideCursor();
1369 1369
 }
1370 1370
 
1371 1371
 void KRenameImpl::toggleName()
1372 1372
 {
1373
-    KApplication::setOverrideCursor( TQt::waitCursor );
1373
+    TDEApplication::setOverrideCursor( TQt::waitCursor );
1374 1374
     fileList->setName( checkName->isChecked() );
1375
-    KApplication::restoreOverrideCursor();
1375
+    TDEApplication::restoreOverrideCursor();
1376 1376
 }
1377 1377
 
1378 1378
 void KRenameImpl::preferences()
@@ -1786,9 +1786,9 @@ void KRenameImpl::setCounterStart( int index )
1786 1786
 
1787 1787
 void KRenameImpl::loadFilePlugins()
1788 1788
 {
1789
-    KApplication::setOverrideCursor( TQt::WaitCursor );        
1789
+    TDEApplication::setOverrideCursor( TQt::WaitCursor );        
1790 1790
     plugin->loadPlugins( true );
1791
-    KApplication::restoreOverrideCursor();
1791
+    TDEApplication::restoreOverrideCursor();
1792 1792
     pluginHelpChanged();
1793 1793
     
1794 1794
     enableControls();

+ 1
- 1
krename/main.cpp View File

@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
117 117
     TDECmdLineArgs::init( argc, argv, &aboutData );
118 118
     TDECmdLineArgs::addCmdLineOptions( options );
119 119
 
120
-    KApplication a;
120
+    TDEApplication a;
121 121
     a.connect( &a, TQT_SIGNAL( lastWindowClosed() ), &a, TQT_SLOT( quit() ) );
122 122
 
123 123
     KImageIO::registerFormats();

+ 1
- 1
krename/threadedlister.cpp View File

@@ -88,7 +88,7 @@ void ThreadedLister::run()
88 88
     m_internal->lock();
89 89
     m_internal->unlock();
90 90
     
91
-    KApplication::postEvent( m_list, new TQCustomEvent( (TQEvent::Type)ThreadedLister::TYPE(), (void*)this ) );
91
+    TDEApplication::postEvent( m_list, new TQCustomEvent( (TQEvent::Type)ThreadedLister::TYPE(), (void*)this ) );
92 92
 }
93 93
 
94 94
 

Loading…
Cancel
Save