summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-10-09 15:58:52 (UTC)
committer zautrix <zautrix>2004-10-09 15:58:52 (UTC)
commitb80a099d9432bdc3d4eea778b1813b82b2680ecf (patch) (unidiff)
tree6327321f86070a13969b07e25b9cf84d4ad10d13 /microkde
parented1eac5e36e675b030cb5a5aa90fb2d44eb40c73 (diff)
downloadkdepimpi-b80a099d9432bdc3d4eea778b1813b82b2680ecf.zip
kdepimpi-b80a099d9432bdc3d4eea778b1813b82b2680ecf.tar.gz
kdepimpi-b80a099d9432bdc3d4eea778b1813b82b2680ecf.tar.bz2
removed some debug output
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kconfig.cpp4
-rw-r--r--microkde/kdecore/kstandarddirs.cpp2
-rw-r--r--microkde/kdeui/kactioncollection.cpp5
-rw-r--r--microkde/kdeui/klistview.cpp2
4 files changed, 7 insertions, 6 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index ba41f6c..5b685d3 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -248,50 +248,50 @@ void KConfig::writeEntry( const QString & e, const QSize & s )
248 writeEntry( e, intlist ); 248 writeEntry( e, intlist );
249} 249}
250 250
251void KConfig::writeEntry( const QString & e , const QFont & f ) 251void KConfig::writeEntry( const QString & e , const QFont & f )
252{ 252{
253 QStringList font; 253 QStringList font;
254 font.append( f.family()); 254 font.append( f.family());
255 font.append( (!f.bold ()?"nonbold":"bold") ); 255 font.append( (!f.bold ()?"nonbold":"bold") );
256 font.append( QString::number ( f.pointSize () ) ); 256 font.append( QString::number ( f.pointSize () ) );
257 font.append( !f.italic ()?"nonitalic":"italic" ); 257 font.append( !f.italic ()?"nonitalic":"italic" );
258 writeEntry( e, font ); 258 writeEntry( e, font );
259} 259}
260 260
261void KConfig::writeEntry( const QString &key, const QDateTime &dt ) 261void KConfig::writeEntry( const QString &key, const QDateTime &dt )
262{ 262{
263 mDateTimeMap.insert( mGroup + key, dt ); 263 mDateTimeMap.insert( mGroup + key, dt );
264} 264}
265 265
266void KConfig::load() 266void KConfig::load()
267{ 267{
268 268
269 269
270 QFile f( mFileName ); 270 QFile f( mFileName );
271 if ( !f.open( IO_ReadOnly ) ) { 271 if ( !f.open( IO_ReadOnly ) ) {
272 qDebug("KConfig: could not open file %s ",mFileName.latin1() ); 272 //qDebug("KConfig: could not open file %s ",mFileName.latin1() );
273 return; 273 return;
274 } 274 }
275 275
276 mBoolMap.clear(); 276 mBoolMap.clear();
277 mStringMap.clear(); 277 mStringMap.clear();
278 278
279 QTextStream t( &f ); 279 QTextStream t( &f );
280 280
281 QString line = t.readLine(); 281 QString line = t.readLine();
282 282
283 while ( !line.isNull() ) { 283 while ( !line.isNull() ) {
284 QStringList tokens = QStringList::split( ",", line ); 284 QStringList tokens = QStringList::split( ",", line );
285 if ( tokens[0] == "bool" ) { 285 if ( tokens[0] == "bool" ) {
286 bool value = false; 286 bool value = false;
287 if ( tokens[2] == "1" ) value = true; 287 if ( tokens[2] == "1" ) value = true;
288 mBoolMap.insert( tokens[1], value ); 288 mBoolMap.insert( tokens[1], value );
289 } else if ( tokens[0] == "QString" ) { 289 } else if ( tokens[0] == "QString" ) {
290 QString value = tokens[2]; 290 QString value = tokens[2];
291 mStringMap.insert( tokens[1], value ); 291 mStringMap.insert( tokens[1], value );
292 } else if ( tokens[0] == "QDateTime" ) { 292 } else if ( tokens[0] == "QDateTime" ) {
293#if 0 293#if 0
294 int year = tokens[2].toInt(); 294 int year = tokens[2].toInt();
295 QDateTime dt( QDate( year, 295 QDateTime dt( QDate( year,
296 tokens[3].toInt(), 296 tokens[3].toInt(),
297 tokens[4].toInt() ), 297 tokens[4].toInt() ),
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index 1c3e0ae..4c03c15 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -1535,49 +1535,49 @@ QString KStandardDirs::appDir()
1535 return mAppDir; 1535 return mAppDir;
1536} 1536}
1537 1537
1538// just to make code more readable without macros 1538// just to make code more readable without macros
1539QString locate( const char *type, 1539QString locate( const char *type,
1540 const QString& filename/*US , const KInstance* inst*/ ) 1540 const QString& filename/*US , const KInstance* inst*/ )
1541{ 1541{
1542//US return inst->dirs()->findResource(type, filename); 1542//US return inst->dirs()->findResource(type, filename);
1543 return KGlobal::dirs()->findResource(type, filename); 1543 return KGlobal::dirs()->findResource(type, filename);
1544} 1544}
1545 1545
1546QString locateLocal( const char *type, 1546QString locateLocal( const char *type,
1547 const QString& filename/*US , const KInstance* inst*/ ) 1547 const QString& filename/*US , const KInstance* inst*/ )
1548{ 1548{
1549 1549
1550 QString path = locateLocal(type, filename, true /*US, inst*/); 1550 QString path = locateLocal(type, filename, true /*US, inst*/);
1551 1551
1552 1552
1553/* 1553/*
1554 static int ccc = 0; 1554 static int ccc = 0;
1555 ++ccc; 1555 ++ccc;
1556 if ( ccc > 13 ) 1556 if ( ccc > 13 )
1557 abort(); 1557 abort();
1558*/ 1558*/
1559 qDebug("locatelocal: %s" , path.latin1()); 1559 //qDebug("locatelocal: %s" , path.latin1());
1560 return path; 1560 return path;
1561 1561
1562/*US why do we put all files into one directory. It is quit complicated. 1562/*US why do we put all files into one directory. It is quit complicated.
1563why not staying with the original directorystructure ? 1563why not staying with the original directorystructure ?
1564 1564
1565 1565
1566 QString escapedFilename = filename; 1566 QString escapedFilename = filename;
1567 escapedFilename.replace( QRegExp( "/" ), "_" ); 1567 escapedFilename.replace( QRegExp( "/" ), "_" );
1568 1568
1569 QString path = KStandardDirs::appDir() + type + "_" + escapedFilename; 1569 QString path = KStandardDirs::appDir() + type + "_" + escapedFilename;
1570 1570
1571 kdDebug() << "locate: '" << path << "'" << endl; 1571 kdDebug() << "locate: '" << path << "'" << endl;
1572 qDebug("locate: %s" , path.latin1()); 1572 qDebug("locate: %s" , path.latin1());
1573 return path; 1573 return path;
1574*/ 1574*/
1575//US so my proposal is this: 1575//US so my proposal is this:
1576 1576
1577// QString escapedFilename = filename; 1577// QString escapedFilename = filename;
1578// escapedFilename.replace( QRegExp( "/" ), "_" ); 1578// escapedFilename.replace( QRegExp( "/" ), "_" );
1579 1579
1580#if 0 1580#if 0
1581#ifdef _WIN32_ 1581#ifdef _WIN32_
1582 QString path = QDir::convertSeparators(KStandardDirs::appDir() + type + "/" + filename); 1582 QString path = QDir::convertSeparators(KStandardDirs::appDir() + type + "/" + filename);
1583#else 1583#else
diff --git a/microkde/kdeui/kactioncollection.cpp b/microkde/kdeui/kactioncollection.cpp
index b819e76..69e5d02 100644
--- a/microkde/kdeui/kactioncollection.cpp
+++ b/microkde/kdeui/kactioncollection.cpp
@@ -132,53 +132,54 @@ KActionCollection::KActionCollection( const KActionCollection &copy )
132 132
133KActionCollection::~KActionCollection() 133KActionCollection::~KActionCollection()
134{ 134{
135 kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; 135 kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl;
136 for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { 136 for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
137 KAction* pAction = it.current(); 137 KAction* pAction = it.current();
138 if ( pAction->m_parentCollection == this ) 138 if ( pAction->m_parentCollection == this )
139 pAction->m_parentCollection = 0L; 139 pAction->m_parentCollection = 0L;
140 } 140 }
141 141
142//US delete d->m_kaccel; 142//US delete d->m_kaccel;
143//US delete d->m_builderKAccel; 143//US delete d->m_builderKAccel;
144 delete d; d = 0; 144 delete d; d = 0;
145} 145}
146 146
147void KActionCollection::setWidget( QWidget* w ) 147void KActionCollection::setWidget( QWidget* w )
148{ 148{
149 //if ( d->m_actionDict.count() > 0 ) { 149 //if ( d->m_actionDict.count() > 0 ) {
150 // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl; 150 // kdError(129) << "KActionCollection::setWidget(): must be called before any actions are added to collection!" << endl;
151 // kdDebug(129) << kdBacktrace() << endl; 151 // kdDebug(129) << kdBacktrace() << endl;
152 //} 152 //}
153 //else 153 //else
154 if ( !d->m_widget ) { 154 if ( !d->m_widget ) {
155 d->m_widget = w; 155 d->m_widget = w;
156 qDebug("KActionCollection::setWidget: warning: KAccel is never used in microkde"); 156 //qDebug("KActionCollection::setWidget: warning: KAccel is never used in microkde");
157//US d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" ); 157//US d->m_kaccel = new KAccel( w, this, "KActionCollection-KAccel" );
158 } 158 }
159 else if ( d->m_widget != w ) 159 else if ( d->m_widget != w )
160 kdWarning(129) << "KActionCollection::setWidget(): tried to change widget from " << d->m_widget << " to " << w << endl; 160 ;
161
161} 162}
162 163
163void KActionCollection::setAutoConnectShortcuts( bool b ) 164void KActionCollection::setAutoConnectShortcuts( bool b )
164{ 165{
165 d->m_bAutoConnectShortcuts = b; 166 d->m_bAutoConnectShortcuts = b;
166} 167}
167 168
168bool KActionCollection::isAutoConnectShortcuts() 169bool KActionCollection::isAutoConnectShortcuts()
169{ 170{
170 return d->m_bAutoConnectShortcuts; 171 return d->m_bAutoConnectShortcuts;
171} 172}
172 173
173bool KActionCollection::addDocCollection( KActionCollection* pDoc ) 174bool KActionCollection::addDocCollection( KActionCollection* pDoc )
174{ 175{
175 d->m_docList.append( pDoc ); 176 d->m_docList.append( pDoc );
176 return true; 177 return true;
177} 178}
178 179
179void KActionCollection::beginXMLPlug( QWidget *widget ) 180void KActionCollection::beginXMLPlug( QWidget *widget )
180{ 181{
181 qDebug("KActionCollection::beginXMLPlug has to be fixed"); 182 qDebug("KActionCollection::beginXMLPlug has to be fixed");
182/*US 183/*US
183 kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl; 184 kdDebug(129) << "KActionCollection::beginXMLPlug( buildWidget = " << widget << " ): this = " << this << " d->m_builderKAccel = " << d->m_builderKAccel << endl;
184 185
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index b53a88a..2856f2d 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -494,49 +494,49 @@ bool KListView::isExecuteArea( int x )
494 return ( x > offset && x < ( offset + width ) ); 494 return ( x > offset && x < ( offset + width ) );
495 } 495 }
496} 496}
497 497
498void KListView::slotOnItem( QListViewItem *item ) 498void KListView::slotOnItem( QListViewItem *item )
499{ 499{
500 QPoint vp = viewport()->mapFromGlobal( QCursor::pos() ); 500 QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
501 if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) { 501 if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) {
502 d->autoSelect.start( d->autoSelectDelay, true ); 502 d->autoSelect.start( d->autoSelectDelay, true );
503 d->pCurrentItem = item; 503 d->pCurrentItem = item;
504 } 504 }
505} 505}
506 506
507void KListView::slotOnViewport() 507void KListView::slotOnViewport()
508{ 508{
509 if ( d->bChangeCursorOverItem ) 509 if ( d->bChangeCursorOverItem )
510 viewport()->unsetCursor(); 510 viewport()->unsetCursor();
511 511
512 d->autoSelect.stop(); 512 d->autoSelect.stop();
513 d->pCurrentItem = 0L; 513 d->pCurrentItem = 0L;
514} 514}
515 515
516void KListView::slotSettingsChanged(int category) 516void KListView::slotSettingsChanged(int category)
517{ 517{
518qDebug("KListView::slotSettingsChanged has to be verified"); 518 //qDebug("KListView::slotSettingsChanged has to be verified");
519/*US 519/*US
520 520
521 switch (category) 521 switch (category)
522 { 522 {
523 case KApplication::SETTINGS_MOUSE: 523 case KApplication::SETTINGS_MOUSE:
524 d->dragDelay = KGlobalSettings::dndEventDelay(); 524 d->dragDelay = KGlobalSettings::dndEventDelay();
525 d->bUseSingle = KGlobalSettings::singleClick(); 525 d->bUseSingle = KGlobalSettings::singleClick();
526 526
527 disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), 527 disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
528 this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int))); 528 this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int)));
529 529
530 if( d->bUseSingle ) 530 if( d->bUseSingle )
531 connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), 531 connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
532 this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int))); 532 this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int)));
533 533
534 d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); 534 d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
535 d->autoSelectDelay = KGlobalSettings::autoSelectDelay(); 535 d->autoSelectDelay = KGlobalSettings::autoSelectDelay();
536 536
537 if( !d->bUseSingle || !d->bChangeCursorOverItem ) 537 if( !d->bUseSingle || !d->bChangeCursorOverItem )
538 viewport()->unsetCursor(); 538 viewport()->unsetCursor();
539 539
540 break; 540 break;
541 541
542 case KApplication::SETTINGS_POPUPMENU: 542 case KApplication::SETTINGS_POPUPMENU: