diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-05-14 02:06:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-05-14 02:06:47 +0000 |
commit | acc2b77512ce0d8d708dda14dec1464f3eed830c (patch) | |
tree | 7917cc141e67ba40a4d4b06c752b66ede069b3da /kresources | |
parent | 54887c51b14c7707178d43d39413bf1bc7a17472 (diff) | |
download | tdepim-acc2b77512ce0d8d708dda14dec1464f3eed830c.tar.gz tdepim-acc2b77512ce0d8d708dda14dec1464f3eed830c.zip |
Second batch of kdepim stability and functionality repairs
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1126473 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources')
-rw-r--r-- | kresources/lib/Makefile.am | 10 | ||||
-rw-r--r-- | kresources/remote/resourceremote.cpp | 20 |
2 files changed, 20 insertions, 10 deletions
diff --git a/kresources/lib/Makefile.am b/kresources/lib/Makefile.am index 0b3f29b6e..0a4d3e37b 100644 --- a/kresources/lib/Makefile.am +++ b/kresources/lib/Makefile.am @@ -1,7 +1,4 @@ -INCLUDES = -I$(top_srcdir) \ --I$(top_srcdir)/libkcal/libical/src/libical -I$(top_srcdir)/libkcal/libical/src/libicalss \ - -I$(top_builddir)/libkcal/libical/src/libical -I$(top_builddir)/libkcal/libical/src/libicalss \ - $(all_includes) +INCLUDES = -I$(top_srcdir) $(all_includes) lib_LTLIBRARIES = libkgroupwarebase.la libkgroupwaredav.la @@ -24,11 +21,11 @@ libkgroupwaredav_la_LIBADD = $(top_builddir)/libkcal/libkcal.la \ METASOURCES = AUTO -### We use three (or more) namespaces here in here - KPIM, KABC and KCal. +### We use three (or more) namespaces here in here - KPIM, KABC and KCal. ### When using multiple "using namespace foo" declarations, namespaced ### definitions cannot be resolved properly; we could use namespace foo { } ### instead, but this breaks on KConfigXT generated code, which still uses -### "using namespace" and can't be fixed due to our backwards-compatibility +### "using namespace" and can't be fixed due to our backwards-compatibility ### requirements. This is only fatal when doing --enable-final, since only ### then do all the namespaces get mixed together. KDE_OPTIONS = nofinal @@ -36,4 +33,3 @@ KDE_OPTIONS = nofinal messages: rc.cpp $(XGETTEXT) *.cpp -o $(podir)/kdepimresources.pot -webdavhandler.lo: ../../libkcal/libical/src/libical/ical.h diff --git a/kresources/remote/resourceremote.cpp b/kresources/remote/resourceremote.cpp index 3c9db7695..68d484c01 100644 --- a/kresources/remote/resourceremote.cpp +++ b/kresources/remote/resourceremote.cpp @@ -30,6 +30,7 @@ #include <kurl.h> #include <kio/job.h> #include <klocale.h> +#include <kmessagebox.h> #include <kstandarddirs.h> #include <libkcal/icalformat.h> @@ -220,7 +221,20 @@ void ResourceRemote::slotPercent( KIO::Job *, unsigned long percent ) void ResourceRemote::slotLoadJobResult( KIO::Job *job ) { if ( job->error() ) { - job->showErrorDialog( 0 ); + // TODO: Should detect 404, 401 etc. vs host not found and prompt to create new resource only when 404 is returned + QString warningString = QString("<b>") + i18n("Remote data access failure") + QString("</b><p>") + i18n("Detailed information") \ + + QString(":<br>") + job->errorString() + QString("<p>") + i18n("What would you like to do?"); + int rc = KMessageBox::warningContinueCancel(0, + warningString, i18n("Remote Data Access Failure"), i18n("&Continue with cached resource")); + if ( rc == KMessageBox::Continue ) { + mCalendar.close(); + disableChangeNotification(); + loadCache(); + enableChangeNotification(); + + emit resourceChanged( this ); + } + //job->showErrorDialog( 0 ); } else { kdDebug(5800) << "ResourceRemote::slotLoadJobResult() success" << endl; @@ -284,7 +298,7 @@ void ResourceRemote::slotSaveJobResult( KIO::Job *job ) job->showErrorDialog( 0 ); } else { kdDebug(5800) << "ResourceRemote::slotSaveJobResult() success" << endl; - + Incidence::List::ConstIterator it; for( it = mChangedIncidences.begin(); it != mChangedIncidences.end(); ++it ) { @@ -292,7 +306,7 @@ void ResourceRemote::slotSaveJobResult( KIO::Job *job ) } mChangedIncidences.clear(); } - + mUploadJob = 0; emit resourceSaved( this ); |