-rw-r--r-- | kabc/formatfactory.cpp | 5 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/settings.cpp | 1 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 2 | ||||
-rw-r--r-- | korganizer/korganizer.pro | 2 | ||||
-rw-r--r-- | libkcal/calendar.cpp | 1 | ||||
-rw-r--r-- | libkcal/event.cpp | 6 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 7 | ||||
-rw-r--r-- | libkdepim/phoneaccess.cpp | 2 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 3 | ||||
-rw-r--r-- | microkde/kdecore/klibloader.cpp | 14 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 2 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.h | 2 |
13 files changed, 21 insertions, 30 deletions
diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp index f2f03c6..3ae1c27 100644 --- a/kabc/formatfactory.cpp +++ b/kabc/formatfactory.cpp @@ -47,48 +47,49 @@ FormatFactory *FormatFactory::self() FormatFactory::FormatFactory() { mFormatList.setAutoDelete( true ); // dummy entry for default format FormatInfo *info = new FormatInfo; info->library = "<NoLibrary>"; info->nameLabel = i18n( "vCard" ); info->descriptionLabel = i18n( "vCard Format" ); mFormatList.insert( "vcard", info ); -/*US lets enter all resources directly instead of using teh desktopfiles. +#if 0 +US lets enter all resources directly instead of using teh desktopfiles. QStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true ); for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { //US KSimpleConfig config( *it, true ); KConfig config( *it ); if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) continue; info = new FormatInfo; config.setGroup( "Plugin" ); QString type = config.readEntry( "Type" ); info->library = config.readEntry( "X-KDE-Library" ); config.setGroup( "Misc" ); info->nameLabel = config.readEntry( "Name" ); info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) ); mFormatList.insert( type, info ); } -*/ +#endif //US we already have vcard as default format. info = new FormatInfo; info->library = i18n("microkabcformat_binary"); info->nameLabel = i18n( "Binary" ); info->descriptionLabel = i18n( "No description available." ); mFormatList.insert( "binary", info ); } FormatFactory::~FormatFactory() { mFormatList.clear(); diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp index 8f909f9..9436d43 100644 --- a/kmicromail/libmailwrapper/settings.cpp +++ b/kmicromail/libmailwrapper/settings.cpp @@ -110,25 +110,24 @@ void Settings::readAccounts() it->read(); } } Account::Account() { accountName = "changeMe"; type = MAILLIB::A_UNDEFINED; ssl = false; connectionType = 1; offline = false; maxMailSize = 0; - lastFetch; leaveOnServer = false; } void Account::remove() { QFile file( getFileName() ); file.remove(); } void Account::setPasswordList(const QStringList &str) { password = ""; diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index df7d612..6a312b3 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -308,25 +308,25 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) return; QPainter pa; if ( mSelected ) { pa.begin( paintPixSel() ); } else { if ( mAllDay ) pa.begin( paintPixAllday() ); else pa.begin( paintPix() ); } int x, yy, w, h; - float nfh; + float nfh = 7.0; x = pos().x(); w = width(); h = height (); if ( mAllDay ) yy = y(); else yy = mCellYTop * ( height() / cellHeight() ); xPaintCoord= x; yPaintCoord = yy; wPaintCoord = width(); hPaintCoord = height(); //qDebug("paintMe %s %d %d %d %d",incidence()->summary().latin1(), x, yy, width(), height()); if ( paint == 0 ) paint = &pa; diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro index 3c7a1fb..5e82721 100644 --- a/korganizer/korganizer.pro +++ b/korganizer/korganizer.pro @@ -1,14 +1,14 @@ TEMPLATE = app -CONFIG += qt warn_off +CONFIG += qt warn_on TARGET = kopi OBJECTS_DIR = _obj/ MOC_DIR = _moc DESTDIR= ../bin include( ../variables.pri ) INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim #../qtcompat DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER #KORG_NOPRINTER KORG_NOKABC KORG_NODND diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 88351eb..dcfee5d 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -115,24 +115,25 @@ Calendar::~Calendar() const QString &Calendar::getOwner() const { return mOwner; } bool Calendar::undoDeleteIncidence() { if (!mUndoIncidence) return false; addIncidence(mUndoIncidence); mUndoIncidence = 0; + return true; } void Calendar::setOwner(const QString &os) { int i; mOwner = os; i = mOwner.find(','); if (i != -1) mOwner = mOwner.left(i); setModified( true ); } diff --git a/libkcal/event.cpp b/libkcal/event.cpp index 7256f05..de8dceb 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -80,25 +80,25 @@ bool Event::contains ( Event* from ) if ( !alarms().count() ) return false; Alarm *b = alarms().first(); if( ! b->enabled() ) return false; if ( ! (a->offset() == b->offset() )) return false; } } QStringList cat = categories(); QStringList catFrom = from->categories(); QString nCat; - int iii; + unsigned int iii; for ( iii = 0; iii < catFrom.count();++iii ) { nCat = catFrom[iii]; if ( !nCat.isEmpty() ) if ( !cat.contains( nCat )) { return false; } } if ( from->doesRecur() ) if ( from->doesRecur() != doesRecur() && ! (from->doesRecur()== Recurrence::rYearlyMonth && doesRecur()== Recurrence::rYearlyDay) ) return false; return true; } @@ -111,26 +111,24 @@ void Event::setDtEnd(const QDateTime &dtEnd) setHasEndDate(true); setHasDuration(false); updated(); } QDateTime Event::dtEnd() const { if (hasEndDate()) return mDtEnd; if (hasDuration()) return dtStart().addSecs(duration()); - kdDebug(5800) << "Warning! Event '" << summary() - << "' does have neither end date nor duration." << endl; return dtStart(); } QString Event::dtEndTimeStr() const { return KGlobal::locale()->formatTime(mDtEnd.time()); } QString Event::dtEndDateStr(bool shortfmt) const { return KGlobal::locale()->formatDate(mDtEnd.date(),shortfmt); } @@ -176,25 +174,25 @@ void Event::setDuration(int seconds) QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const { bool yes; QDateTime incidenceStart = getNextOccurence( QDateTime::currentDateTime(), &yes ); if ( ! yes || cancelled() ) { *ok = false; return QDateTime (); } bool enabled = false; Alarm* alarm; - int off; + int off = 0; QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; // if ( QDateTime::currentDateTime() > incidenceStart ){ // *ok = false; // return incidenceStart; // } for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { if ( alarm->time() < alarmStart ) { alarmStart = alarm->time(); enabled = true; off = alarmStart.secsTo( incidenceStart ); diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index d81a68f..9c04a7e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -87,25 +87,25 @@ bool Todo::contains ( Todo* from ) return false; Alarm *b = alarms().first(); if( ! b->enabled() ) return false; if ( ! (a->offset() == b->offset() )) return false; } } QStringList cat = categories(); QStringList catFrom = from->categories(); QString nCat; - int iii; + unsigned int iii; for ( iii = 0; iii < catFrom.count();++iii ) { nCat = catFrom[iii]; if ( !nCat.isEmpty() ) if ( !cat.contains( nCat )) { return false; } } if ( from->isCompleted() ) { if ( !isCompleted() ) return false; } if( priority() != from->priority() ) @@ -366,25 +366,25 @@ void Todo::setPercentComplete(int v) updated(); } QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const { if ( isCompleted() || ! hasDueDate() || cancelled() ) { *ok = false; return QDateTime (); } QDateTime incidenceStart; incidenceStart = dtDue(); bool enabled = false; Alarm* alarm; - int off; + int off = 0; QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; // if ( QDateTime::currentDateTime() > incidenceStart ){ // *ok = false; // return incidenceStart; // } for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { if ( alarm->time() < alarmStart ) { alarmStart = alarm->time(); enabled = true; off = alarmStart.secsTo( incidenceStart ); diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 3adbf61..df5a0d9 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -50,25 +50,25 @@ #include <qlabel.h> #include <qcheckbox.h> #include <klocale.h> #include <kglobal.h> #include <kconfig.h> #include <kfiledialog.h> QDateTime KSyncManager::mRequestedSyncEvent; KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) - : QObject(), mParent(parent), mImplementation(implementation), mTargetApp(ta), mPrefs(prefs ),mSyncMenu(syncmenu) + : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) { mServerSocket = 0; bar = new QProgressBar ( 1, 0 ); bar->setCaption (""); mWriteBackInPast = 2; int w = 300; if ( QApplication::desktop()->width() < 320 ) w = 220; int h = bar->sizeHint().height() ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); @@ -451,28 +451,27 @@ void KSyncManager::syncLocalFile() if ( syncWithFile( fn, false ) ) { qDebug("KSM::syncLocalFile() successful "); } } bool KSyncManager::syncWithFile( QString fn , bool quick ) { bool ret = false; QFileInfo info; info.setFile( fn ); QString mess; - bool loadbup = true; if ( !info. exists() ) { mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); - int result = QMessageBox::warning( mParent, i18n("Warning!"), + QMessageBox::warning( mParent, i18n("Warning!"), mess ); return ret; } int result = 0; if ( !quick ) { mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); result = QMessageBox::warning( mParent, i18n("Warning!"), mess, i18n("Sync"), i18n("Cancel"), 0, 0, 1 ); if ( result ) return false; @@ -547,25 +546,25 @@ int KSyncManager::ringSync() int syncedProfiles = 0; unsigned int i; QTime timer; KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); QStringList syncProfileNames = mSyncProfileNames; KSyncProfile* temp = new KSyncProfile (); mAskForPreferences = false; for ( i = 0; i < syncProfileNames.count(); ++i ) { mCurrentSyncProfile = i; temp->setName(syncProfileNames[mCurrentSyncProfile]); temp->readConfig(&config); - bool includeInRingSync; + bool includeInRingSync = false; switch(mTargetApp) { case (KAPI): includeInRingSync = temp->getIncludeInRingSyncAB(); break; case (KOPI): includeInRingSync = temp->getIncludeInRingSync(); break; case (PWMPI): includeInRingSync = temp->getIncludeInRingSyncPWM(); break; default: diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index e24ad9e..89db22b 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -173,25 +173,25 @@ bool PhoneAccess::writeToPhone( QString fileName) bool PhoneAccess::readFromPhone( QString fileName) { #ifdef DESKTOP_VERSION #ifdef _WIN32_ QString command ="kammu --backup " + fileName + " -yes" ; #else QString command ="./kammu --backup " + fileName + " -yes" ; #endif #else QString command ="kammu --backup " + fileName + " -yes" ; #endif - int ret; + int ret = 1; while ( ret != 0 ) { QLabel* status = new QLabel( i18n(" This may take 1-3 minutes!"), 0 ); int w = 235; int h = status->sizeHint().height()+20 ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); if ( dw > 310 ) w = 310; status->setCaption(i18n("Reading from phone...") ); status->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); status->show(); status->raise(); diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 21aa0a4..f05b91b 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -76,25 +76,26 @@ bool KApplication::convert2latin1(QString fileName) } QTextStream ts( &file ); ts.setEncoding( QTextStream::UnicodeUTF8 ); text = ts.read(); file.close(); if (!file.open( IO_WriteOnly ) ) { return false; } QTextStream tsIn( &file ); tsIn.setEncoding( QTextStream::Latin1 ); tsIn << text.latin1(); - file.close(); + file.close(); + return true; } void KApplication::showText(QString caption, QString text) { QDialog dia( 0, "name", true ); ; dia.setCaption( caption ); QVBoxLayout* lay = new QVBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); KTextEdit tb ( &dia ); tb.setWordWrap( QMultiLineEdit::WidgetWidth ); diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp index 1394154..6d0475a 100644 --- a/microkde/kdecore/klibloader.cpp +++ b/microkde/kdecore/klibloader.cpp @@ -487,35 +487,27 @@ KLibrary* KLibLoader::library( const char *name ) if ( libfile.isEmpty() ) return 0; #ifdef DESKTOP_VERSION QLibrary *qlib = new QLibrary( libfile.latin1() ); #else QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately ); #endif //US lt_dlhandle handle = lt_dlopen( libfile.latin1() ); //US if ( !handle ) if ( !qlib ) { -//US const char* errmsg = lt_dlerror(); - char* errmsg; - sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1()); - qDebug(errmsg); - - if(errmsg) - d->errorMessage = QString::fromLatin1(errmsg); - else - d->errorMessage = QString::null; - kdWarning(150) << "library=" << name << ": file=" << libfile << ": " << d->errorMessage << endl; - return 0; + qDebug( "KLibLoader::library could not load library: %s", libfile.latin1()); + d->errorMessage = QString::null; + return 0; } else d->errorMessage = QString::null; KLibrary *lib = new KLibrary( name, libfile, qlib ); wrap = new KLibWrapPrivate(lib, qlib); d->loaded_stack.prepend(wrap); } m_libs.insert( name, wrap ); connect( wrap->lib, SIGNAL( destroyed() ), this, SLOT( slotLibraryDestroyed() ) ); diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp index 1ad1728..09ad0c8 100644 --- a/microkde/kdeui/ktoolbar.cpp +++ b/microkde/kdeui/ktoolbar.cpp @@ -869,25 +869,25 @@ void KToolBar::enableMoving(bool flag ) } void KToolBar::setBarPos (BarPosition bpos) { if ( !mainWindow() ) return; //US mainWindow()->moveDockWindow( this, (Dock)bpos ); mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos ); } -KToolBar::BarPosition KToolBar::barPos() +KToolBar::BarPosition KToolBar::barPos() const { if ( !(QMainWindow*)mainWindow() ) return KToolBar::Top; //US Dock dock; QMainWindow::ToolBarDock dock; int dm1, dm2; bool dm3; ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 ); //US if ( dock == DockUnmanaged ) { if ( dock == QMainWindow::Unmanaged ) { return (KToolBar::BarPosition)Top; } diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h index 61b5ea3..49ff856 100644 --- a/microkde/kdeui/ktoolbar.h +++ b/microkde/kdeui/ktoolbar.h @@ -737,25 +737,25 @@ public: */ void enableMoving(bool flag = true); /** * Set position of toolbar. * @see BarPosition() */ void setBarPos (BarPosition bpos); /** * Returns position of toolbar. */ - BarPosition barPos(); + BarPosition barPos() const; /** * @deprecated * Show, hide, or toggle toolbar. * * This method is provided for compatibility only, * please use show() and/or hide() instead. * @see BarStatus */ bool enable(BarStatus stat); /** |