summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/formatfactory.cpp5
-rw-r--r--kmicromail/libmailwrapper/settings.cpp1
-rw-r--r--korganizer/koagendaitem.cpp2
-rw-r--r--korganizer/korganizer.pro2
-rw-r--r--libkcal/calendar.cpp1
-rw-r--r--libkcal/event.cpp6
-rw-r--r--libkcal/todo.cpp4
-rw-r--r--libkdepim/ksyncmanager.cpp7
-rw-r--r--libkdepim/phoneaccess.cpp2
-rw-r--r--microkde/kapplication.cpp3
-rw-r--r--microkde/kdecore/klibloader.cpp14
-rw-r--r--microkde/kdeui/ktoolbar.cpp2
-rw-r--r--microkde/kdeui/ktoolbar.h2
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
@@ -35,72 +35,73 @@ using namespace KABC;
35 35
36FormatFactory *FormatFactory::mSelf = 0; 36FormatFactory *FormatFactory::mSelf = 0;
37static KStaticDeleter<FormatFactory> factoryDeleter; 37static KStaticDeleter<FormatFactory> factoryDeleter;
38 38
39FormatFactory *FormatFactory::self() 39FormatFactory *FormatFactory::self()
40{ 40{
41 if ( !mSelf ) { 41 if ( !mSelf ) {
42//US factoryDeleter.setObject( mSelf, new FormatFactory ); 42//US factoryDeleter.setObject( mSelf, new FormatFactory );
43 mSelf = factoryDeleter.setObject( new FormatFactory ); 43 mSelf = factoryDeleter.setObject( new FormatFactory );
44 } 44 }
45 return mSelf; 45 return mSelf;
46} 46}
47 47
48FormatFactory::FormatFactory() 48FormatFactory::FormatFactory()
49{ 49{
50 mFormatList.setAutoDelete( true ); 50 mFormatList.setAutoDelete( true );
51 51
52 // dummy entry for default format 52 // dummy entry for default format
53 FormatInfo *info = new FormatInfo; 53 FormatInfo *info = new FormatInfo;
54 info->library = "<NoLibrary>"; 54 info->library = "<NoLibrary>";
55 info->nameLabel = i18n( "vCard" ); 55 info->nameLabel = i18n( "vCard" );
56 info->descriptionLabel = i18n( "vCard Format" ); 56 info->descriptionLabel = i18n( "vCard Format" );
57 mFormatList.insert( "vcard", info ); 57 mFormatList.insert( "vcard", info );
58 58
59/*US lets enter all resources directly instead of using teh desktopfiles. 59#if 0
60US lets enter all resources directly instead of using teh desktopfiles.
60 61
61 QStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true ); 62 QStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true );
62 for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) 63 for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
63 { 64 {
64//US KSimpleConfig config( *it, true ); 65//US KSimpleConfig config( *it, true );
65 KConfig config( *it ); 66 KConfig config( *it );
66 67
67 if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) ) 68 if ( !config.hasGroup( "Misc" ) || !config.hasGroup( "Plugin" ) )
68 continue; 69 continue;
69 70
70 info = new FormatInfo; 71 info = new FormatInfo;
71 72
72 config.setGroup( "Plugin" ); 73 config.setGroup( "Plugin" );
73 QString type = config.readEntry( "Type" ); 74 QString type = config.readEntry( "Type" );
74 info->library = config.readEntry( "X-KDE-Library" ); 75 info->library = config.readEntry( "X-KDE-Library" );
75 76
76 config.setGroup( "Misc" ); 77 config.setGroup( "Misc" );
77 info->nameLabel = config.readEntry( "Name" ); 78 info->nameLabel = config.readEntry( "Name" );
78 info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) ); 79 info->descriptionLabel = config.readEntry( "Comment", i18n( "No description available." ) );
79 80
80 mFormatList.insert( type, info ); 81 mFormatList.insert( type, info );
81 } 82 }
82*/ 83#endif
83 //US we already have vcard as default format. 84 //US we already have vcard as default format.
84 info = new FormatInfo; 85 info = new FormatInfo;
85 info->library = i18n("microkabcformat_binary"); 86 info->library = i18n("microkabcformat_binary");
86 info->nameLabel = i18n( "Binary" ); 87 info->nameLabel = i18n( "Binary" );
87 info->descriptionLabel = i18n( "No description available." ); 88 info->descriptionLabel = i18n( "No description available." );
88 mFormatList.insert( "binary", info ); 89 mFormatList.insert( "binary", info );
89 90
90} 91}
91 92
92FormatFactory::~FormatFactory() 93FormatFactory::~FormatFactory()
93{ 94{
94 mFormatList.clear(); 95 mFormatList.clear();
95} 96}
96 97
97QStringList FormatFactory::formats() 98QStringList FormatFactory::formats()
98{ 99{
99 QStringList retval; 100 QStringList retval;
100 101
101 // make sure 'vcard' is the first entry 102 // make sure 'vcard' is the first entry
102 retval << "vcard"; 103 retval << "vcard";
103 104
104 QDictIterator<FormatInfo> it( mFormatList ); 105 QDictIterator<FormatInfo> it( mFormatList );
105 for ( ; it.current(); ++it ) 106 for ( ; it.current(); ++it )
106 if ( it.currentKey() != "vcard" ) 107 if ( it.currentKey() != "vcard" )
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
@@ -98,49 +98,48 @@ void Settings::saveAccounts()
98 98
99 for ( it = accounts.first(); it; it = accounts.next() ) { 99 for ( it = accounts.first(); it; it = accounts.next() ) {
100 it->save(); 100 it->save();
101 } 101 }
102} 102}
103 103
104void Settings::readAccounts() 104void Settings::readAccounts()
105{ 105{
106 checkDirectory(); 106 checkDirectory();
107 Account *it; 107 Account *it;
108 108
109 for ( it = accounts.first(); it; it = accounts.next() ) { 109 for ( it = accounts.first(); it; it = accounts.next() ) {
110 it->read(); 110 it->read();
111 } 111 }
112} 112}
113 113
114Account::Account() 114Account::Account()
115{ 115{
116 accountName = "changeMe"; 116 accountName = "changeMe";
117 type = MAILLIB::A_UNDEFINED; 117 type = MAILLIB::A_UNDEFINED;
118 ssl = false; 118 ssl = false;
119 connectionType = 1; 119 connectionType = 1;
120 offline = false; 120 offline = false;
121 maxMailSize = 0; 121 maxMailSize = 0;
122 lastFetch;
123 leaveOnServer = false; 122 leaveOnServer = false;
124} 123}
125 124
126void Account::remove() 125void Account::remove()
127{ 126{
128 QFile file( getFileName() ); 127 QFile file( getFileName() );
129 file.remove(); 128 file.remove();
130} 129}
131 130
132void Account::setPasswordList(const QStringList &str) 131void Account::setPasswordList(const QStringList &str)
133{ 132{
134 password = ""; 133 password = "";
135 int i; 134 int i;
136 for ( i = 0; i < str.count() ; ++i ) { 135 for ( i = 0; i < str.count() ; ++i ) {
137 QChar c ( (str[i].toUInt()-131)/(str.count()- (i%3))); 136 QChar c ( (str[i].toUInt()-131)/(str.count()- (i%3)));
138 password.append( c ); 137 password.append( c );
139 } 138 }
140 //qDebug("password %s ", password.latin1()); 139 //qDebug("password %s ", password.latin1());
141} 140}
142QStringList Account::getPasswordList() 141QStringList Account::getPasswordList()
143{ 142{
144 int i; 143 int i;
145 int len = password.length(); 144 int len = password.length();
146 QStringList str; 145 QStringList str;
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index df7d612..6a312b3 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -296,49 +296,49 @@ bool KOAgendaItem::eventFilter ( QObject *object, QEvent *e )
296 return event(&returnEvent); 296 return event(&returnEvent);
297 } else { 297 } else {
298 return false; 298 return false;
299 } 299 }
300} 300}
301void KOAgendaItem::repaintMe( ) 301void KOAgendaItem::repaintMe( )
302{ 302{
303 paintMe ( mSelected ); 303 paintMe ( mSelected );
304} 304}
305void KOAgendaItem::paintMe( bool selected, QPainter* paint ) 305void KOAgendaItem::paintMe( bool selected, QPainter* paint )
306{ 306{
307 if ( globalFlagBlockAgendaItemUpdate && ! selected) 307 if ( globalFlagBlockAgendaItemUpdate && ! selected)
308 return; 308 return;
309 QPainter pa; 309 QPainter pa;
310 310
311 if ( mSelected ) { 311 if ( mSelected ) {
312 pa.begin( paintPixSel() ); 312 pa.begin( paintPixSel() );
313 } else { 313 } else {
314 if ( mAllDay ) 314 if ( mAllDay )
315 pa.begin( paintPixAllday() ); 315 pa.begin( paintPixAllday() );
316 else 316 else
317 pa.begin( paintPix() ); 317 pa.begin( paintPix() );
318 } 318 }
319 int x, yy, w, h; 319 int x, yy, w, h;
320 float nfh; 320 float nfh = 7.0;
321 x = pos().x(); w = width(); h = height (); 321 x = pos().x(); w = width(); h = height ();
322 if ( mAllDay ) 322 if ( mAllDay )
323 yy = y(); 323 yy = y();
324 else 324 else
325 yy = mCellYTop * ( height() / cellHeight() ); 325 yy = mCellYTop * ( height() / cellHeight() );
326 xPaintCoord= x; 326 xPaintCoord= x;
327 yPaintCoord = yy; 327 yPaintCoord = yy;
328 wPaintCoord = width(); 328 wPaintCoord = width();
329 hPaintCoord = height(); 329 hPaintCoord = height();
330 //qDebug("paintMe %s %d %d %d %d",incidence()->summary().latin1(), x, yy, width(), height()); 330 //qDebug("paintMe %s %d %d %d %d",incidence()->summary().latin1(), x, yy, width(), height());
331 if ( paint == 0 ) 331 if ( paint == 0 )
332 paint = &pa; 332 paint = &pa;
333 bool horLayout = ( w < h ); 333 bool horLayout = ( w < h );
334 int maxhei = mFontPixelSize+4; 334 int maxhei = mFontPixelSize+4;
335 if ( horLayout ) 335 if ( horLayout )
336 maxhei += AGENDA_ICON_SIZE -4; 336 maxhei += AGENDA_ICON_SIZE -4;
337 bool small = ( h < maxhei ); 337 bool small = ( h < maxhei );
338 if ( ! small ) 338 if ( ! small )
339 paint->setFont(KOPrefs::instance()->mAgendaViewFont); 339 paint->setFont(KOPrefs::instance()->mAgendaViewFont);
340 else { 340 else {
341 QFont f = KOPrefs::instance()->mAgendaViewFont; 341 QFont f = KOPrefs::instance()->mAgendaViewFont;
342 f.setBold( false ); 342 f.setBold( false );
343 int fh = f.pointSize(); 343 int fh = f.pointSize();
344 nfh = (((float)height())/(float)(mFontPixelSize+4))*fh; 344 nfh = (((float)height())/(float)(mFontPixelSize+4))*fh;
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index 3c7a1fb..5e82721 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,26 +1,26 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG += qt warn_off 2 CONFIG += qt warn_on
3 TARGET = kopi 3 TARGET = kopi
4OBJECTS_DIR = _obj/ 4OBJECTS_DIR = _obj/
5MOC_DIR = _moc 5MOC_DIR = _moc
6DESTDIR= ../bin 6DESTDIR= ../bin
7 7
8include( ../variables.pri ) 8include( ../variables.pri )
9 9
10INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim 10INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim
11#../qtcompat 11#../qtcompat
12DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL 12DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
13DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER 13DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
14#KORG_NOPRINTER KORG_NOKABC KORG_NODND 14#KORG_NOPRINTER KORG_NOKABC KORG_NODND
15DEFINES += KORG_NOLVALTERNATION 15DEFINES += KORG_NOLVALTERNATION
16DEFINES += DESKTOP_VERSION 16DEFINES += DESKTOP_VERSION
17unix : { 17unix : {
18LIBS += ../bin/libmicrokdepim.so 18LIBS += ../bin/libmicrokdepim.so
19LIBS += ../bin/libmicrokcal.so 19LIBS += ../bin/libmicrokcal.so
20LIBS += ../bin/libmicrokde.so 20LIBS += ../bin/libmicrokde.so
21LIBS += ../bin/libmicrokabc.so 21LIBS += ../bin/libmicrokabc.so
22#LIBS += -lbluetooth 22#LIBS += -lbluetooth
23#LIBS += -lsdp 23#LIBS += -lsdp
24 24
25#LIBS += -lldap 25#LIBS += -lldap
26OBJECTS_DIR = obj/unix 26OBJECTS_DIR = obj/unix
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 88351eb..dcfee5d 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -103,48 +103,49 @@ void Calendar::init()
103 setTimeZone(tzStr); 103 setTimeZone(tzStr);
104#endif 104#endif
105 105
106// KOPrefs::instance()->writeConfig(); 106// KOPrefs::instance()->writeConfig();
107} 107}
108 108
109Calendar::~Calendar() 109Calendar::~Calendar()
110{ 110{
111 delete mDefaultFilter; 111 delete mDefaultFilter;
112 if ( mUndoIncidence ) 112 if ( mUndoIncidence )
113 delete mUndoIncidence; 113 delete mUndoIncidence;
114} 114}
115 115
116const QString &Calendar::getOwner() const 116const QString &Calendar::getOwner() const
117{ 117{
118 return mOwner; 118 return mOwner;
119} 119}
120 120
121bool Calendar::undoDeleteIncidence() 121bool Calendar::undoDeleteIncidence()
122{ 122{
123 if (!mUndoIncidence) 123 if (!mUndoIncidence)
124 return false; 124 return false;
125 addIncidence(mUndoIncidence); 125 addIncidence(mUndoIncidence);
126 mUndoIncidence = 0; 126 mUndoIncidence = 0;
127 return true;
127} 128}
128void Calendar::setOwner(const QString &os) 129void Calendar::setOwner(const QString &os)
129{ 130{
130 int i; 131 int i;
131 mOwner = os; 132 mOwner = os;
132 i = mOwner.find(','); 133 i = mOwner.find(',');
133 if (i != -1) 134 if (i != -1)
134 mOwner = mOwner.left(i); 135 mOwner = mOwner.left(i);
135 136
136 setModified( true ); 137 setModified( true );
137} 138}
138 139
139void Calendar::setTimeZone(const QString & tz) 140void Calendar::setTimeZone(const QString & tz)
140{ 141{
141 bool neg = FALSE; 142 bool neg = FALSE;
142 int hours, minutes; 143 int hours, minutes;
143 QString tmpStr(tz); 144 QString tmpStr(tz);
144 145
145 if (tmpStr.left(1) == "-") 146 if (tmpStr.left(1) == "-")
146 neg = TRUE; 147 neg = TRUE;
147 if (tmpStr.left(1) == "-" || tmpStr.left(1) == "+") 148 if (tmpStr.left(1) == "-" || tmpStr.left(1) == "+")
148 tmpStr.remove(0, 1); 149 tmpStr.remove(0, 1);
149 hours = tmpStr.left(2).toInt(); 150 hours = tmpStr.left(2).toInt();
150 if (tmpStr.length() > 2) 151 if (tmpStr.length() > 2)
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index 7256f05..de8dceb 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -68,81 +68,79 @@ bool Event::contains ( Event* from )
68 if ( from->dtEnd().isValid() ) 68 if ( from->dtEnd().isValid() )
69 if ( dtEnd() != from->dtEnd() ) 69 if ( dtEnd() != from->dtEnd() )
70 return false; 70 return false;
71 if ( !from->location().isEmpty() ) 71 if ( !from->location().isEmpty() )
72 if ( !location().startsWith( from->location() ) ) 72 if ( !location().startsWith( from->location() ) )
73 return false; 73 return false;
74 if ( !from->description().isEmpty() ) 74 if ( !from->description().isEmpty() )
75 if ( !description().startsWith( from->description() )) 75 if ( !description().startsWith( from->description() ))
76 return false; 76 return false;
77 if ( from->alarms().count() ) { 77 if ( from->alarms().count() ) {
78 Alarm *a = from->alarms().first(); 78 Alarm *a = from->alarms().first();
79 if ( a->enabled() ){ 79 if ( a->enabled() ){
80 if ( !alarms().count() ) 80 if ( !alarms().count() )
81 return false; 81 return false;
82 Alarm *b = alarms().first(); 82 Alarm *b = alarms().first();
83 if( ! b->enabled() ) 83 if( ! b->enabled() )
84 return false; 84 return false;
85 if ( ! (a->offset() == b->offset() )) 85 if ( ! (a->offset() == b->offset() ))
86 return false; 86 return false;
87 } 87 }
88 } 88 }
89 QStringList cat = categories(); 89 QStringList cat = categories();
90 QStringList catFrom = from->categories(); 90 QStringList catFrom = from->categories();
91 QString nCat; 91 QString nCat;
92 int iii; 92 unsigned int iii;
93 for ( iii = 0; iii < catFrom.count();++iii ) { 93 for ( iii = 0; iii < catFrom.count();++iii ) {
94 nCat = catFrom[iii]; 94 nCat = catFrom[iii];
95 if ( !nCat.isEmpty() ) 95 if ( !nCat.isEmpty() )
96 if ( !cat.contains( nCat )) { 96 if ( !cat.contains( nCat )) {
97 return false; 97 return false;
98 } 98 }
99 } 99 }
100 if ( from->doesRecur() ) 100 if ( from->doesRecur() )
101 if ( from->doesRecur() != doesRecur() && ! (from->doesRecur()== Recurrence::rYearlyMonth && doesRecur()== Recurrence::rYearlyDay) ) 101 if ( from->doesRecur() != doesRecur() && ! (from->doesRecur()== Recurrence::rYearlyMonth && doesRecur()== Recurrence::rYearlyDay) )
102 return false; 102 return false;
103 return true; 103 return true;
104} 104}
105 105
106void Event::setDtEnd(const QDateTime &dtEnd) 106void Event::setDtEnd(const QDateTime &dtEnd)
107{ 107{
108 if (mReadOnly) return; 108 if (mReadOnly) return;
109 109
110 mDtEnd = getEvenTime( dtEnd ); 110 mDtEnd = getEvenTime( dtEnd );
111 111
112 setHasEndDate(true); 112 setHasEndDate(true);
113 setHasDuration(false); 113 setHasDuration(false);
114 114
115 updated(); 115 updated();
116} 116}
117 117
118QDateTime Event::dtEnd() const 118QDateTime Event::dtEnd() const
119{ 119{
120 if (hasEndDate()) return mDtEnd; 120 if (hasEndDate()) return mDtEnd;
121 if (hasDuration()) return dtStart().addSecs(duration()); 121 if (hasDuration()) return dtStart().addSecs(duration());
122 122
123 kdDebug(5800) << "Warning! Event '" << summary()
124 << "' does have neither end date nor duration." << endl;
125 return dtStart(); 123 return dtStart();
126} 124}
127 125
128QString Event::dtEndTimeStr() const 126QString Event::dtEndTimeStr() const
129{ 127{
130 return KGlobal::locale()->formatTime(mDtEnd.time()); 128 return KGlobal::locale()->formatTime(mDtEnd.time());
131} 129}
132 130
133QString Event::dtEndDateStr(bool shortfmt) const 131QString Event::dtEndDateStr(bool shortfmt) const
134{ 132{
135 return KGlobal::locale()->formatDate(mDtEnd.date(),shortfmt); 133 return KGlobal::locale()->formatDate(mDtEnd.date(),shortfmt);
136} 134}
137 135
138QString Event::dtEndStr(bool shortfmt) const 136QString Event::dtEndStr(bool shortfmt) const
139{ 137{
140 return KGlobal::locale()->formatDateTime(mDtEnd, shortfmt); 138 return KGlobal::locale()->formatDateTime(mDtEnd, shortfmt);
141} 139}
142 140
143void Event::setHasEndDate(bool b) 141void Event::setHasEndDate(bool b)
144{ 142{
145 mHasEndDate = b; 143 mHasEndDate = b;
146} 144}
147 145
148bool Event::hasEndDate() const 146bool Event::hasEndDate() const
@@ -164,49 +162,49 @@ void Event::setTransparency(Event::Transparency transparency)
164} 162}
165 163
166Event::Transparency Event::transparency() const 164Event::Transparency Event::transparency() const
167{ 165{
168 return mTransparency; 166 return mTransparency;
169} 167}
170 168
171void Event::setDuration(int seconds) 169void Event::setDuration(int seconds)
172{ 170{
173 setHasEndDate(false); 171 setHasEndDate(false);
174 Incidence::setDuration(seconds); 172 Incidence::setDuration(seconds);
175} 173}
176QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const 174QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const
177{ 175{
178 176
179 bool yes; 177 bool yes;
180 QDateTime incidenceStart = getNextOccurence( QDateTime::currentDateTime(), &yes ); 178 QDateTime incidenceStart = getNextOccurence( QDateTime::currentDateTime(), &yes );
181 if ( ! yes || cancelled() ) { 179 if ( ! yes || cancelled() ) {
182 *ok = false; 180 *ok = false;
183 return QDateTime (); 181 return QDateTime ();
184 } 182 }
185 183
186 bool enabled = false; 184 bool enabled = false;
187 Alarm* alarm; 185 Alarm* alarm;
188 int off; 186 int off = 0;
189 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 187 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
190 // if ( QDateTime::currentDateTime() > incidenceStart ){ 188 // if ( QDateTime::currentDateTime() > incidenceStart ){
191// *ok = false; 189// *ok = false;
192// return incidenceStart; 190// return incidenceStart;
193// } 191// }
194 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 192 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
195 if (alarm->enabled()) { 193 if (alarm->enabled()) {
196 if ( alarm->hasTime () ) { 194 if ( alarm->hasTime () ) {
197 if ( alarm->time() < alarmStart ) { 195 if ( alarm->time() < alarmStart ) {
198 alarmStart = alarm->time(); 196 alarmStart = alarm->time();
199 enabled = true; 197 enabled = true;
200 off = alarmStart.secsTo( incidenceStart ); 198 off = alarmStart.secsTo( incidenceStart );
201 } 199 }
202 200
203 } else { 201 } else {
204 int secs = alarm->startOffset().asSeconds(); 202 int secs = alarm->startOffset().asSeconds();
205 if ( incidenceStart.addSecs( secs ) < alarmStart ) { 203 if ( incidenceStart.addSecs( secs ) < alarmStart ) {
206 alarmStart = incidenceStart.addSecs( secs ); 204 alarmStart = incidenceStart.addSecs( secs );
207 enabled = true; 205 enabled = true;
208 off = -secs; 206 off = -secs;
209 } 207 }
210 } 208 }
211 } 209 }
212 } 210 }
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index d81a68f..9c04a7e 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -75,49 +75,49 @@ bool Todo::contains ( Todo* from )
75 return false; 75 return false;
76 } 76 }
77 if ( !from->location().isEmpty() ) 77 if ( !from->location().isEmpty() )
78 if ( !location().startsWith( from->location() ) ) 78 if ( !location().startsWith( from->location() ) )
79 return false; 79 return false;
80 if ( !from->description().isEmpty() ) 80 if ( !from->description().isEmpty() )
81 if ( !description().startsWith( from->description() )) 81 if ( !description().startsWith( from->description() ))
82 return false; 82 return false;
83 if ( from->alarms().count() ) { 83 if ( from->alarms().count() ) {
84 Alarm *a = from->alarms().first(); 84 Alarm *a = from->alarms().first();
85 if ( a->enabled() ){ 85 if ( a->enabled() ){
86 if ( !alarms().count() ) 86 if ( !alarms().count() )
87 return false; 87 return false;
88 Alarm *b = alarms().first(); 88 Alarm *b = alarms().first();
89 if( ! b->enabled() ) 89 if( ! b->enabled() )
90 return false; 90 return false;
91 if ( ! (a->offset() == b->offset() )) 91 if ( ! (a->offset() == b->offset() ))
92 return false; 92 return false;
93 } 93 }
94 } 94 }
95 95
96 QStringList cat = categories(); 96 QStringList cat = categories();
97 QStringList catFrom = from->categories(); 97 QStringList catFrom = from->categories();
98 QString nCat; 98 QString nCat;
99 int iii; 99 unsigned int iii;
100 for ( iii = 0; iii < catFrom.count();++iii ) { 100 for ( iii = 0; iii < catFrom.count();++iii ) {
101 nCat = catFrom[iii]; 101 nCat = catFrom[iii];
102 if ( !nCat.isEmpty() ) 102 if ( !nCat.isEmpty() )
103 if ( !cat.contains( nCat )) { 103 if ( !cat.contains( nCat )) {
104 return false; 104 return false;
105 } 105 }
106 } 106 }
107 if ( from->isCompleted() ) { 107 if ( from->isCompleted() ) {
108 if ( !isCompleted() ) 108 if ( !isCompleted() )
109 return false; 109 return false;
110 } 110 }
111 if( priority() != from->priority() ) 111 if( priority() != from->priority() )
112 return false; 112 return false;
113 113
114 114
115 return true; 115 return true;
116 116
117} 117}
118bool KCal::operator==( const Todo& t1, const Todo& t2 ) 118bool KCal::operator==( const Todo& t1, const Todo& t2 )
119{ 119{
120 120
121 bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); 121 bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 );
122 if ( ! ret ) 122 if ( ! ret )
123 return false; 123 return false;
@@ -354,49 +354,49 @@ bool Todo::hasCompletedDate() const
354} 354}
355 355
356int Todo::percentComplete() const 356int Todo::percentComplete() const
357{ 357{
358 return mPercentComplete; 358 return mPercentComplete;
359} 359}
360 360
361void Todo::setPercentComplete(int v) 361void Todo::setPercentComplete(int v)
362{ 362{
363 mPercentComplete = v; 363 mPercentComplete = v;
364 if ( v != 100 ) 364 if ( v != 100 )
365 mHasCompletedDate = false; 365 mHasCompletedDate = false;
366 updated(); 366 updated();
367} 367}
368QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const 368QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const
369{ 369{
370 if ( isCompleted() || ! hasDueDate() || cancelled() ) { 370 if ( isCompleted() || ! hasDueDate() || cancelled() ) {
371 *ok = false; 371 *ok = false;
372 return QDateTime (); 372 return QDateTime ();
373 } 373 }
374 QDateTime incidenceStart; 374 QDateTime incidenceStart;
375 incidenceStart = dtDue(); 375 incidenceStart = dtDue();
376 bool enabled = false; 376 bool enabled = false;
377 Alarm* alarm; 377 Alarm* alarm;
378 int off; 378 int off = 0;
379 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 379 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
380 // if ( QDateTime::currentDateTime() > incidenceStart ){ 380 // if ( QDateTime::currentDateTime() > incidenceStart ){
381// *ok = false; 381// *ok = false;
382// return incidenceStart; 382// return incidenceStart;
383// } 383// }
384 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 384 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
385 if (alarm->enabled()) { 385 if (alarm->enabled()) {
386 if ( alarm->hasTime () ) { 386 if ( alarm->hasTime () ) {
387 if ( alarm->time() < alarmStart ) { 387 if ( alarm->time() < alarmStart ) {
388 alarmStart = alarm->time(); 388 alarmStart = alarm->time();
389 enabled = true; 389 enabled = true;
390 off = alarmStart.secsTo( incidenceStart ); 390 off = alarmStart.secsTo( incidenceStart );
391 } 391 }
392 392
393 } else { 393 } else {
394 int secs = alarm->startOffset().asSeconds(); 394 int secs = alarm->startOffset().asSeconds();
395 if ( incidenceStart.addSecs( secs ) < alarmStart ) { 395 if ( incidenceStart.addSecs( secs ) < alarmStart ) {
396 alarmStart = incidenceStart.addSecs( secs ); 396 alarmStart = incidenceStart.addSecs( secs );
397 enabled = true; 397 enabled = true;
398 off = -secs; 398 off = -secs;
399 } 399 }
400 } 400 }
401 } 401 }
402 } 402 }
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 3adbf61..df5a0d9 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -38,49 +38,49 @@
38#include <qprogressbar.h> 38#include <qprogressbar.h>
39#include <qpopupmenu.h> 39#include <qpopupmenu.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qbuttongroup.h> 42#include <qbuttongroup.h>
43#include <qtimer.h> 43#include <qtimer.h>
44#include <qmessagebox.h> 44#include <qmessagebox.h>
45#include <qapplication.h> 45#include <qapplication.h>
46#include <qlineedit.h> 46#include <qlineedit.h>
47#include <qdialog.h> 47#include <qdialog.h>
48#include <qlayout.h> 48#include <qlayout.h>
49#include <qtextcodec.h> 49#include <qtextcodec.h>
50#include <qlabel.h> 50#include <qlabel.h>
51#include <qcheckbox.h> 51#include <qcheckbox.h>
52 52
53#include <klocale.h> 53#include <klocale.h>
54#include <kglobal.h> 54#include <kglobal.h>
55#include <kconfig.h> 55#include <kconfig.h>
56#include <kfiledialog.h> 56#include <kfiledialog.h>
57 57
58QDateTime KSyncManager::mRequestedSyncEvent; 58QDateTime KSyncManager::mRequestedSyncEvent;
59 59
60 60
61KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) 61KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
62 : QObject(), mParent(parent), mImplementation(implementation), mTargetApp(ta), mPrefs(prefs ),mSyncMenu(syncmenu) 62 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
63{ 63{
64 mServerSocket = 0; 64 mServerSocket = 0;
65 bar = new QProgressBar ( 1, 0 ); 65 bar = new QProgressBar ( 1, 0 );
66 bar->setCaption (""); 66 bar->setCaption ("");
67 mWriteBackInPast = 2; 67 mWriteBackInPast = 2;
68 int w = 300; 68 int w = 300;
69 if ( QApplication::desktop()->width() < 320 ) 69 if ( QApplication::desktop()->width() < 320 )
70 w = 220; 70 w = 220;
71 int h = bar->sizeHint().height() ; 71 int h = bar->sizeHint().height() ;
72 int dw = QApplication::desktop()->width(); 72 int dw = QApplication::desktop()->width();
73 int dh = QApplication::desktop()->height(); 73 int dh = QApplication::desktop()->height();
74 bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 74 bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
75 if ( mPrefs->mPassiveSyncAutoStart ) 75 if ( mPrefs->mPassiveSyncAutoStart )
76 enableQuick( false ); 76 enableQuick( false );
77 77
78} 78}
79 79
80KSyncManager::~KSyncManager() 80KSyncManager::~KSyncManager()
81{ 81{
82 delete bar; 82 delete bar;
83} 83}
84 84
85 85
86void KSyncManager::fillSyncMenu() 86void KSyncManager::fillSyncMenu()
@@ -439,52 +439,51 @@ void KSyncManager::syncLocalFile()
439 case (PWMPI): 439 case (PWMPI):
440 ext = "(*.pwm)"; 440 ext = "(*.pwm)";
441 break; 441 break;
442 default: 442 default:
443 qDebug("KSM::syncLocalFile: invalid apptype selected"); 443 qDebug("KSM::syncLocalFile: invalid apptype selected");
444 break; 444 break;
445 445
446 } 446 }
447 447
448 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent ); 448 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent );
449 if ( fn == "" ) 449 if ( fn == "" )
450 return; 450 return;
451 if ( syncWithFile( fn, false ) ) { 451 if ( syncWithFile( fn, false ) ) {
452 qDebug("KSM::syncLocalFile() successful "); 452 qDebug("KSM::syncLocalFile() successful ");
453 } 453 }
454 454
455} 455}
456 456
457bool KSyncManager::syncWithFile( QString fn , bool quick ) 457bool KSyncManager::syncWithFile( QString fn , bool quick )
458{ 458{
459 bool ret = false; 459 bool ret = false;
460 QFileInfo info; 460 QFileInfo info;
461 info.setFile( fn ); 461 info.setFile( fn );
462 QString mess; 462 QString mess;
463 bool loadbup = true;
464 if ( !info. exists() ) { 463 if ( !info. exists() ) {
465 mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); 464 mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) );
466 int result = QMessageBox::warning( mParent, i18n("Warning!"), 465 QMessageBox::warning( mParent, i18n("Warning!"),
467 mess ); 466 mess );
468 return ret; 467 return ret;
469 } 468 }
470 int result = 0; 469 int result = 0;
471 if ( !quick ) { 470 if ( !quick ) {
472 mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 471 mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
473 result = QMessageBox::warning( mParent, i18n("Warning!"), 472 result = QMessageBox::warning( mParent, i18n("Warning!"),
474 mess, 473 mess,
475 i18n("Sync"), i18n("Cancel"), 0, 474 i18n("Sync"), i18n("Cancel"), 0,
476 0, 1 ); 475 0, 1 );
477 if ( result ) 476 if ( result )
478 return false; 477 return false;
479 } 478 }
480 if ( mAskForPreferences ) 479 if ( mAskForPreferences )
481 if ( !edit_sync_options()) { 480 if ( !edit_sync_options()) {
482 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 481 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
483 return false; 482 return false;
484 } 483 }
485 if ( result == 0 ) { 484 if ( result == 0 ) {
486 //qDebug("Now sycing ... "); 485 //qDebug("Now sycing ... ");
487 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) ) 486 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) )
488 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") ); 487 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") );
489 else 488 else
490 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); 489 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
@@ -535,49 +534,49 @@ void KSyncManager::multiSync( bool askforPrefs )
535 if ( num ) 534 if ( num )
536 emit save(); 535 emit save();
537 if ( num ) 536 if ( num )
538 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); 537 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) );
539 else 538 else
540 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); 539 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
541 return; 540 return;
542} 541}
543 542
544int KSyncManager::ringSync() 543int KSyncManager::ringSync()
545{ 544{
546 545
547 int syncedProfiles = 0; 546 int syncedProfiles = 0;
548 unsigned int i; 547 unsigned int i;
549 QTime timer; 548 QTime timer;
550 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 549 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
551 QStringList syncProfileNames = mSyncProfileNames; 550 QStringList syncProfileNames = mSyncProfileNames;
552 KSyncProfile* temp = new KSyncProfile (); 551 KSyncProfile* temp = new KSyncProfile ();
553 mAskForPreferences = false; 552 mAskForPreferences = false;
554 for ( i = 0; i < syncProfileNames.count(); ++i ) { 553 for ( i = 0; i < syncProfileNames.count(); ++i ) {
555 mCurrentSyncProfile = i; 554 mCurrentSyncProfile = i;
556 temp->setName(syncProfileNames[mCurrentSyncProfile]); 555 temp->setName(syncProfileNames[mCurrentSyncProfile]);
557 temp->readConfig(&config); 556 temp->readConfig(&config);
558 557
559 bool includeInRingSync; 558 bool includeInRingSync = false;
560 switch(mTargetApp) 559 switch(mTargetApp)
561 { 560 {
562 case (KAPI): 561 case (KAPI):
563 includeInRingSync = temp->getIncludeInRingSyncAB(); 562 includeInRingSync = temp->getIncludeInRingSyncAB();
564 break; 563 break;
565 case (KOPI): 564 case (KOPI):
566 includeInRingSync = temp->getIncludeInRingSync(); 565 includeInRingSync = temp->getIncludeInRingSync();
567 break; 566 break;
568 case (PWMPI): 567 case (PWMPI):
569 includeInRingSync = temp->getIncludeInRingSyncPWM(); 568 includeInRingSync = temp->getIncludeInRingSyncPWM();
570 break; 569 break;
571 default: 570 default:
572 qDebug("KSM::ringSync: invalid apptype selected"); 571 qDebug("KSM::ringSync: invalid apptype selected");
573 break; 572 break;
574 573
575 } 574 }
576 575
577 576
578 if ( includeInRingSync && ( i < 1 || i > 2 )) { 577 if ( includeInRingSync && ( i < 1 || i > 2 )) {
579 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 578 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
580 ++syncedProfiles; 579 ++syncedProfiles;
581 mSyncWithDesktop = false; 580 mSyncWithDesktop = false;
582 // mAskForPreferences = temp->getAskForPreferences(); 581 // mAskForPreferences = temp->getAskForPreferences();
583 mWriteBackFile = temp->getWriteBackFile(); 582 mWriteBackFile = temp->getWriteBackFile();
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index e24ad9e..89db22b 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -161,49 +161,49 @@ bool PhoneAccess::writeToPhone( QString fileName)
161 delete status; 161 delete status;
162 qApp->processEvents(); 162 qApp->processEvents();
163 if ( ret ) { 163 if ( ret ) {
164 qDebug("Error S::command returned %d.", ret); 164 qDebug("Error S::command returned %d.", ret);
165 int retval = KMessageBox::warningContinueCancel(0, 165 int retval = KMessageBox::warningContinueCancel(0,
166 i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel")); 166 i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel"));
167 if ( retval != KMessageBox::Continue ) 167 if ( retval != KMessageBox::Continue )
168 return false; 168 return false;
169 } 169 }
170 } 170 }
171 return true; 171 return true;
172} 172}
173bool PhoneAccess::readFromPhone( QString fileName) 173bool PhoneAccess::readFromPhone( QString fileName)
174{ 174{
175 175
176#ifdef DESKTOP_VERSION 176#ifdef DESKTOP_VERSION
177#ifdef _WIN32_ 177#ifdef _WIN32_
178 QString command ="kammu --backup " + fileName + " -yes" ; 178 QString command ="kammu --backup " + fileName + " -yes" ;
179#else 179#else
180 QString command ="./kammu --backup " + fileName + " -yes" ; 180 QString command ="./kammu --backup " + fileName + " -yes" ;
181#endif 181#endif
182#else 182#else
183 QString command ="kammu --backup " + fileName + " -yes" ; 183 QString command ="kammu --backup " + fileName + " -yes" ;
184#endif 184#endif
185 int ret; 185 int ret = 1;
186 while ( ret != 0 ) { 186 while ( ret != 0 ) {
187 QLabel* status = new QLabel( i18n(" This may take 1-3 minutes!"), 0 ); 187 QLabel* status = new QLabel( i18n(" This may take 1-3 minutes!"), 0 );
188 int w = 235; 188 int w = 235;
189 int h = status->sizeHint().height()+20 ; 189 int h = status->sizeHint().height()+20 ;
190 int dw = QApplication::desktop()->width(); 190 int dw = QApplication::desktop()->width();
191 int dh = QApplication::desktop()->height(); 191 int dh = QApplication::desktop()->height();
192 if ( dw > 310 ) 192 if ( dw > 310 )
193 w = 310; 193 w = 310;
194 status->setCaption(i18n("Reading from phone...") ); 194 status->setCaption(i18n("Reading from phone...") );
195 status->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 195 status->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
196 status->show(); 196 status->show();
197 status->raise(); 197 status->raise();
198 status->update(); 198 status->update();
199 qApp->processEvents(); 199 qApp->processEvents();
200 status->update(); 200 status->update();
201 qApp->processEvents(); 201 qApp->processEvents();
202 ret = system ( command.latin1() ); 202 ret = system ( command.latin1() );
203 delete status; 203 delete status;
204 qApp->processEvents(); 204 qApp->processEvents();
205 if ( ret ) { 205 if ( ret ) {
206 qDebug("Error reading from phone:Command returned %d", ret); 206 qDebug("Error reading from phone:Command returned %d", ret);
207 int retval = KMessageBox::warningContinueCancel(0, 207 int retval = KMessageBox::warningContinueCancel(0,
208 i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel")); 208 i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel"));
209 if ( retval != KMessageBox::Continue ) 209 if ( retval != KMessageBox::Continue )
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 21aa0a4..f05b91b 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -64,47 +64,48 @@ void KApplication::showFile(QString caption, QString fn)
64 text = ts.read(); 64 text = ts.read();
65 file.close(); 65 file.close();
66 KApplication::showText( caption, text ); 66 KApplication::showText( caption, text );
67 67
68} 68}
69 69
70bool KApplication::convert2latin1(QString fileName) 70bool KApplication::convert2latin1(QString fileName)
71{ 71{
72 QString text; 72 QString text;
73 QFile file( fileName ); 73 QFile file( fileName );
74 if (!file.open( IO_ReadOnly ) ) { 74 if (!file.open( IO_ReadOnly ) ) {
75 return false; 75 return false;
76 76
77 } 77 }
78 QTextStream ts( &file ); 78 QTextStream ts( &file );
79 ts.setEncoding( QTextStream::UnicodeUTF8 ); 79 ts.setEncoding( QTextStream::UnicodeUTF8 );
80 text = ts.read(); 80 text = ts.read();
81 file.close(); 81 file.close();
82 if (!file.open( IO_WriteOnly ) ) { 82 if (!file.open( IO_WriteOnly ) ) {
83 return false; 83 return false;
84 } 84 }
85 QTextStream tsIn( &file ); 85 QTextStream tsIn( &file );
86 tsIn.setEncoding( QTextStream::Latin1 ); 86 tsIn.setEncoding( QTextStream::Latin1 );
87 tsIn << text.latin1(); 87 tsIn << text.latin1();
88 file.close(); 88 file.close();
89 return true;
89 90
90 91
91} 92}
92void KApplication::showText(QString caption, QString text) 93void KApplication::showText(QString caption, QString text)
93{ 94{
94 QDialog dia( 0, "name", true ); ; 95 QDialog dia( 0, "name", true ); ;
95 dia.setCaption( caption ); 96 dia.setCaption( caption );
96 QVBoxLayout* lay = new QVBoxLayout( &dia ); 97 QVBoxLayout* lay = new QVBoxLayout( &dia );
97 lay->setSpacing( 3 ); 98 lay->setSpacing( 3 );
98 lay->setMargin( 3 ); 99 lay->setMargin( 3 );
99 KTextEdit tb ( &dia ); 100 KTextEdit tb ( &dia );
100 tb.setWordWrap( QMultiLineEdit::WidgetWidth ); 101 tb.setWordWrap( QMultiLineEdit::WidgetWidth );
101 lay->addWidget( &tb ); 102 lay->addWidget( &tb );
102 tb.setText( text ); 103 tb.setText( text );
103#ifdef DESKTOP_VERSION 104#ifdef DESKTOP_VERSION
104 dia.resize( 640, 480); 105 dia.resize( 640, 480);
105#else 106#else
106 dia.showMaximized(); 107 dia.showMaximized();
107#endif 108#endif
108 dia.exec(); 109 dia.exec();
109 110
110} 111}
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
@@ -475,59 +475,51 @@ KLibrary* KLibLoader::library( const char *name )
475 wrap = it.current(); 475 wrap = it.current();
476 } 476 }
477 477
478 if (wrap) { 478 if (wrap) {
479 d->pending_close.removeRef(wrap); 479 d->pending_close.removeRef(wrap);
480 if (!wrap->lib) { 480 if (!wrap->lib) {
481 /* This lib only was in loaded_stack, but not in m_libs. */ 481 /* This lib only was in loaded_stack, but not in m_libs. */
482 wrap->lib = new KLibrary( name, wrap->filename, wrap->handle ); 482 wrap->lib = new KLibrary( name, wrap->filename, wrap->handle );
483 } 483 }
484 wrap->ref_count++; 484 wrap->ref_count++;
485 } else { 485 } else {
486 QString libfile = findLibrary( name ); 486 QString libfile = findLibrary( name );
487 if ( libfile.isEmpty() ) 487 if ( libfile.isEmpty() )
488 return 0; 488 return 0;
489#ifdef DESKTOP_VERSION 489#ifdef DESKTOP_VERSION
490 QLibrary *qlib = new QLibrary( libfile.latin1() ); 490 QLibrary *qlib = new QLibrary( libfile.latin1() );
491#else 491#else
492 QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately ); 492 QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately );
493#endif 493#endif
494 494
495//US lt_dlhandle handle = lt_dlopen( libfile.latin1() ); 495//US lt_dlhandle handle = lt_dlopen( libfile.latin1() );
496//US if ( !handle ) 496//US if ( !handle )
497 if ( !qlib ) 497 if ( !qlib )
498 { 498 {
499//US const char* errmsg = lt_dlerror(); 499 qDebug( "KLibLoader::library could not load library: %s", libfile.latin1());
500 char* errmsg; 500 d->errorMessage = QString::null;
501 sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1()); 501 return 0;
502 qDebug(errmsg);
503
504 if(errmsg)
505 d->errorMessage = QString::fromLatin1(errmsg);
506 else
507 d->errorMessage = QString::null;
508 kdWarning(150) << "library=" << name << ": file=" << libfile << ": " << d->errorMessage << endl;
509 return 0;
510 } 502 }
511 else 503 else
512 d->errorMessage = QString::null; 504 d->errorMessage = QString::null;
513 505
514 KLibrary *lib = new KLibrary( name, libfile, qlib ); 506 KLibrary *lib = new KLibrary( name, libfile, qlib );
515 wrap = new KLibWrapPrivate(lib, qlib); 507 wrap = new KLibWrapPrivate(lib, qlib);
516 d->loaded_stack.prepend(wrap); 508 d->loaded_stack.prepend(wrap);
517 } 509 }
518 m_libs.insert( name, wrap ); 510 m_libs.insert( name, wrap );
519 511
520 connect( wrap->lib, SIGNAL( destroyed() ), 512 connect( wrap->lib, SIGNAL( destroyed() ),
521 this, SLOT( slotLibraryDestroyed() ) ); 513 this, SLOT( slotLibraryDestroyed() ) );
522 514
523 return wrap->lib; 515 return wrap->lib;
524} 516}
525 517
526QString KLibLoader::lastErrorMessage() const 518QString KLibLoader::lastErrorMessage() const
527{ 519{
528 return d->errorMessage; 520 return d->errorMessage;
529} 521}
530 522
531void KLibLoader::unloadLibrary( const char *libname ) 523void KLibLoader::unloadLibrary( const char *libname )
532{ 524{
533 KLibWrapPrivate *wrap = m_libs[ libname ]; 525 KLibWrapPrivate *wrap = m_libs[ libname ];
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
@@ -857,49 +857,49 @@ void KToolBar::setFullSize(bool flag )
857 857
858 858
859bool KToolBar::fullSize() const 859bool KToolBar::fullSize() const
860{ 860{
861 return isHorizontalStretchable() || isVerticalStretchable(); 861 return isHorizontalStretchable() || isVerticalStretchable();
862} 862}
863 863
864 864
865void KToolBar::enableMoving(bool flag ) 865void KToolBar::enableMoving(bool flag )
866{ 866{
867//US setMovingEnabled(flag); 867//US setMovingEnabled(flag);
868 this->mainWindow()->setToolBarsMovable(flag); 868 this->mainWindow()->setToolBarsMovable(flag);
869} 869}
870 870
871 871
872void KToolBar::setBarPos (BarPosition bpos) 872void KToolBar::setBarPos (BarPosition bpos)
873{ 873{
874 if ( !mainWindow() ) 874 if ( !mainWindow() )
875 return; 875 return;
876//US mainWindow()->moveDockWindow( this, (Dock)bpos ); 876//US mainWindow()->moveDockWindow( this, (Dock)bpos );
877 mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos ); 877 mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos );
878} 878}
879 879
880 880
881KToolBar::BarPosition KToolBar::barPos() 881KToolBar::BarPosition KToolBar::barPos() const
882{ 882{
883 if ( !(QMainWindow*)mainWindow() ) 883 if ( !(QMainWindow*)mainWindow() )
884 return KToolBar::Top; 884 return KToolBar::Top;
885//US Dock dock; 885//US Dock dock;
886 QMainWindow::ToolBarDock dock; 886 QMainWindow::ToolBarDock dock;
887 int dm1, dm2; 887 int dm1, dm2;
888 bool dm3; 888 bool dm3;
889 ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 ); 889 ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 );
890//US if ( dock == DockUnmanaged ) { 890//US if ( dock == DockUnmanaged ) {
891 if ( dock == QMainWindow::Unmanaged ) { 891 if ( dock == QMainWindow::Unmanaged ) {
892 return (KToolBar::BarPosition)Top; 892 return (KToolBar::BarPosition)Top;
893 } 893 }
894 return (BarPosition)dock; 894 return (BarPosition)dock;
895} 895}
896 896
897 897
898bool KToolBar::enable(BarStatus stat) 898bool KToolBar::enable(BarStatus stat)
899{ 899{
900 bool mystat = isVisible(); 900 bool mystat = isVisible();
901 901
902 if ( (stat == Toggle && mystat) || stat == Hide ) 902 if ( (stat == Toggle && mystat) || stat == Hide )
903 hide(); 903 hide();
904 else 904 else
905 show(); 905 show();
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
@@ -725,49 +725,49 @@ public:
725 */ 725 */
726 void setFullSize(bool flag = true); 726 void setFullSize(bool flag = true);
727 727
728 /** 728 /**
729 * @return @p true if the full-size mode is enabled. Otherwise 729 * @return @p true if the full-size mode is enabled. Otherwise
730 * it returns @false. 730 * it returns @false.
731 */ 731 */
732 bool fullSize() const; 732 bool fullSize() const;
733 733
734 /** 734 /**
735 * @deprecated use setMovingEnabled(bool) instead. 735 * @deprecated use setMovingEnabled(bool) instead.
736 * Enable or disable moving of toolbar. 736 * Enable or disable moving of toolbar.
737 */ 737 */
738 void enableMoving(bool flag = true); 738 void enableMoving(bool flag = true);
739 739
740 /** 740 /**
741 * Set position of toolbar. 741 * Set position of toolbar.
742 * @see BarPosition() 742 * @see BarPosition()
743 */ 743 */
744 void setBarPos (BarPosition bpos); 744 void setBarPos (BarPosition bpos);
745 745
746 /** 746 /**
747 * Returns position of toolbar. 747 * Returns position of toolbar.
748 */ 748 */
749 BarPosition barPos(); 749 BarPosition barPos() const;
750 750
751 /** 751 /**
752 * @deprecated 752 * @deprecated
753 * Show, hide, or toggle toolbar. 753 * Show, hide, or toggle toolbar.
754 * 754 *
755 * This method is provided for compatibility only, 755 * This method is provided for compatibility only,
756 * please use show() and/or hide() instead. 756 * please use show() and/or hide() instead.
757 * @see BarStatus 757 * @see BarStatus
758 */ 758 */
759 bool enable(BarStatus stat); 759 bool enable(BarStatus stat);
760 760
761 /** 761 /**
762 * @deprecated 762 * @deprecated
763 * Use setMaximumHeight() instead. 763 * Use setMaximumHeight() instead.
764 */ 764 */
765 void setMaxHeight (int h); // Set max height for vertical toolbars 765 void setMaxHeight (int h); // Set max height for vertical toolbars
766 766
767 /** 767 /**
768 * @deprecated 768 * @deprecated
769 * Use maximumHeight() instead. 769 * Use maximumHeight() instead.
770 * Returns the value that was set with @ref setMaxHeight(). 770 * Returns the value that was set with @ref setMaxHeight().
771 */ 771 */
772 int maxHeight(); 772 int maxHeight();
773 773