summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefs.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5078c57..0bd46ea 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -5,49 +5,49 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <time.h>
#ifndef _WIN32_
#include <unistd.h>
#endif
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <qstring.h>
#include <qregexp.h>
#include <qfont.h>
#include <qcolor.h>
#include <qstringlist.h>
#include <stdlib.h>
#include <kglobal.h>
#include <kglobalsettings.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
#include <kemailsettings.h>
#include <kstaticdeleter.h>
#include <libkdepim/kpimglobalprefs.h>
#include "koprefs.h"
#include "mainwindow.h"
KOPrefs *KOPrefs::mInstance = 0;
static KStaticDeleter<KOPrefs> insd;
KOPrefs::KOPrefs() :
@@ -284,55 +284,55 @@ KOPrefs::KOPrefs() :
addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
#endif
addItemInt("Day Begins",&mDayBegins,7);
addItemInt("Working Hours Start",&mWorkingHoursStart,8);
addItemInt("Working Hours End",&mWorkingHoursEnd,17);
addItemBool("Exclude Holidays",&mExcludeHolidays,true);
addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
addItemBool("Full View Month",&mFullViewMonth,true);
addItemBool("Full View Todo",&mFullViewTodo,true);
addItemBool("Quick Todo",&mEnableQuickTodo,false);
addItemInt("Next X Days",&mNextXDays,3);
KPrefs::setCurrentGroup("Printer");
KPrefs::setCurrentGroup("Layout");
addItemBool("CompactDialogs",&mCompactDialogs,false);
addItemBool("VerticalScreen",&mVerticalScreen,true);
KPrefs::setCurrentGroup("KOrganizer Plugins");
- addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
+ addItemStringList("SelectedPlugins",&mSelectedPlugins,QStringList("holidays"));
KPrefs::setCurrentGroup("Group Scheduling");
addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
- addItemStringList("AdditionalMails",&mAdditionalMails,"");
+ addItemStringList("AdditionalMails",&mAdditionalMails,QStringList());
addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
KPrefs::setCurrentGroup( "Editors" );
addItemStringList( "EventTemplates", &mEventTemplates );
addItemStringList( "TodoTemplates", &mTodoTemplates );
addItemInt("DestinationPolicy",&mDestination,standardDestination);
KPrefs::setCurrentGroup( "ViewOptions" );
addItemBool("EVshowDetails",&mEVshowDetails,true);
addItemBool("EVshowCreated",&mEVshowCreated,true);
addItemBool("EVshowChanged",&mEVshowChanged,true);
addItemBool("WTshowDetails",&mWTshowDetails,false);
addItemBool("WTshowCreated",&mWTshowCreated,false);
addItemBool("WTshowChanged",&mWTshowChanged,false);
mCalendars.setAutoDelete( true );
}
@@ -545,49 +545,49 @@ int KOPrefs::getFuzzyCalendarID( const QString & name )
return kkf->mCalNumber;
kkf = mCalendars.next();
}
return 0;
}
QString KOPrefs::calName( int calNum) const
{
return (mDefCalColors[calNum-1])->mName;
}
QColor KOPrefs::defaultColor( int calNum ) const
{
if ( calNum == 1 ) return mEventColor;
return (mDefCalColors[calNum-1])->mDefaultColor;
}
void KOPrefs::usrWriteConfig()
{
config()->setGroup("General");
config()->writeEntry("Custom Categories",mCustomCategories);
config()->setGroup("Personal Settings");
config()->writeEntry("user_name",mName);
config()->writeEntry("user_email",mEmail);
config()->setGroup("Category Colors");
- QDictIterator<QColor> it(mCategoryColors);
+ Q3DictIterator<QColor> it(mCategoryColors);
while (it.current()) {
config()->writeEntry(it.currentKey(),*(it.current()));
++it;
}
KConfig fc (locateLocal("config","kopicalendarrc"));
fc.setGroup("CC");
fc.deleteGroup( "CC");
fc.setGroup("CC");
fc.writeEntry("NumberCalendars",mCalendars.count());
int numCal = 1;
int writeCal = 0;
while ( numCal < mNextAvailableCalendar ) {
KopiCalendarFile * kkf = mCalendars.first();
while ( kkf ) {
//qDebug("cal num %d %d ", kkf->mCalNumber, numCal);
if ( kkf->mCalNumber == numCal ) {
++writeCal;
//qDebug("Write calendar %d %d ", numCal , writeCal);
QString prefix = "Cal_" + QString::number( writeCal );
fc.writeEntry( prefix+"_isStandard", kkf->isStandard );
fc.writeEntry( prefix+"_isEnabled", kkf->isEnabled );
fc.writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled );
fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly );
fc.writeEntry( prefix+"_isRelative", kkf->isRelative );