overwrite current url logic
Sandor Bodo-Merle
sbodomerle at gmail.com
Sun Apr 19 10:12:07 MDT 2009
This patch (introduced in r955583) has the result that Tellico ask for
confirmation after every save - and this is annoying imo.
(I cant see how the write is forced by TellicoImporter mentioned in the new
comment.)
Simply reverting it requires to add back the knowledge of class Kernel,
which breaks the intent of the patch.
Any opinion how to overcome this behavior? Eventually add GUI::Proxy::URL()
??
- Sanyi
336606c 2 days ago rstephenson add a simple proxy class to hold widget
pointer, and decouple some classes from Kernel class
diff --git a/src/core/filehandler.cpp b/src/core/filehandler.cpp
index 38466cf..248b34b 100644
--- a/src/core/filehandler.cpp
+++ b/src/core/filehandler.cpp
- // we always overwrite the current URL without asking
- if(url_ != Kernel::self()->URL()) {
- GUI::CursorSaver cs(Qt::ArrowCursor);
- QString str = i18n("A file named \"%1\" already exists. "
- "Are you sure you want to overwrite it?",
url_.fileName());
- int want_continue =
KMessageBox::warningContinueCancel(Kernel::self()->widget(), str,
- i18n("Overwrite
File?"),
-
KGuiItem(i18n("Overwrite")));
+ // no need to check if we're actually overwriting the current url
+ // the TellicoImporter forces the write
+ GUI::CursorSaver cs(Qt::ArrowCursor);
+ QString str = i18n("A file named \"%1\" already exists. "
+ "Are you sure you want to overwrite it?",
url_.fileName());
+ int want_continue =
KMessageBox::warningContinueCancel(GUI::Proxy::widget(), str,
+ i18n("Overwrite
File?"),
+
KGuiItem(i18n("Overwrite")));
- if(want_continue == KMessageBox::Cancel) {
- return false;
- }
+ if(want_continue == KMessageBox::Cancel) {
+ return false;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://forge.novell.com/pipermail/tellico-users/attachments/20090419/b2ee6b07/attachment.html
More information about the tellico-users
mailing list