author | zautrix <zautrix> | 2004-10-23 15:37:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-23 15:37:38 (UTC) |
commit | 5415db4a06862b57539de051e2e82c8d8f3a5b48 (patch) (side-by-side diff) | |
tree | a0a5719246aba7d2a5e36b8d8601193ba9e907b3 | |
parent | 54c77b2331f9afe90643c6d1343a7f5543577b71 (diff) | |
download | kdepimpi-5415db4a06862b57539de051e2e82c8d8f3a5b48.zip kdepimpi-5415db4a06862b57539de051e2e82c8d8f3a5b48.tar.gz kdepimpi-5415db4a06862b57539de051e2e82c8d8f3a5b48.tar.bz2 |
compile fixes
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 5 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 0fdc3e4..e8fd2d1 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -15,48 +15,49 @@ 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. */ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <kglobal.h> #include <kconfig.h> #include <klocale.h> #include <kdebug.h> #include <kstaticdeleter.h> #include <qregexp.h> #include <qfile.h> +#include <stdlib.h> #include <qtextstream.h> #include <qapplication.h> #include "kpimglobalprefs.h" KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP; KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) : KPrefs("microkdeglobalrc") { mLocaleDict = 0; KPrefs::setCurrentGroup("Locale"); addItemInt("PreferredLanguage",&mPreferredLanguage,0); addItemInt("PreferredTime",&mPreferredTime,0); addItemInt("PreferredDate",&mPreferredDate,0); addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); KPrefs::setCurrentGroup("Time & Date"); addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); @@ -90,51 +91,51 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); addItemString( "PagerChannel", &mPagerOtherChannel, "" ); addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); addItemInt( "SIPChannelType", &mSipClient, KPPI_SIC ); addItemString( "SIPChannel", &mSipOtherChannel, "" ); addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); KPrefs::setCurrentGroup( "PhoneAccess" ); addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); } void KPimGlobalPrefs::setGlobalConfig() { if ( mLocaleDict == 0 ) { QString fileName ; QString name = KGlobal::getAppName() +"/"; #ifndef DESKTOP_VERSION - fileName= QString(getenv("QPEDIR"))+"/pics/kdepim/"+name + fileName= QString(getenv("QPEDIR"))+"/pics/kdepim/"+name; #else - fileName = qApp->applicationDirPath () + "/kdepim/"+ name; + fileName = qApp->applicationDirPath () + "/kdepim/"+ name; #endif mLocaleDict = 0; if ( mPreferredLanguage > 0 && mPreferredLanguage < 5 ) { if ( mPreferredLanguage == 1 ) fileName = fileName+"germantranslation.txt"; else if ( mPreferredLanguage == 4 ) fileName = fileName+"usertranslation.txt"; else if ( mPreferredLanguage == 2 ) fileName = fileName+"frenchtranslation.txt"; else if ( mPreferredLanguage == 3 ) fileName = fileName+"italiantranslation.txt"; QFile file( fileName ); if (file.open( IO_ReadOnly ) ) { QTextStream ts( &file ); ts.setEncoding( QTextStream::Latin1 ); //ts.setCodec( QTextCodec::latin1 ); QString text = ts.read(); file.close(); text.replace( QRegExp("\\\\n"), "\n" ); QString line; QString we; QString wt; int br = 0; diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index 9238c8c..d775aa9 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp @@ -34,64 +34,67 @@ #include "pwmdoc.h" #ifdef CONFIG_KWALLETIF # include "kwalletemu.h" #endif // CONFIG_KWALLETIF #ifdef CONFIG_KEYCARD # include "pwmkeycard.h" #endif // CONFIG_KEYCARD #include <qmessagebox.h> #include <kmessagebox.h> #ifndef PWM_EMBEDDED #include <kcmdlineargs.h> #include <kwin.h> #include <dcopclient.h> #endif #include <kapplication.h> #include <kiconloader.h> #include <signal.h> static PwMInit *sig_init_pointer; +#ifdef _WIN32_ +static void sig_handler(int signum) +#else static NOREGPARM void sig_handler(int signum) +#endif { switch (signum) { case SIGINT: case SIGTERM: sig_init_pointer->shutdownApp(20 + signum); break; default: printDebug(string("unhandled signal ") + tostr(signum)); } } - PwMInit::PwMInit(PwMApplication *_app) : runStatus (unknown) , _curWidget (0) , _dcopClient (0) , _kwalletEmu (0) , _keycard (0) , _tray (0) { sig_init_pointer = this; app = _app; } PwMInit::~PwMInit() { #ifndef PWM_EMBEDDED SelfTest::cancel(); // close all open mainwnds QValueList<PwM *>::iterator i = _mainWndList.begin(), end = _mainWndList.end(); #else // close all open mainwnds QValueList<PwM *>::Iterator i = _mainWndList.begin(), end = _mainWndList.end(); |