[kmobiletools] KDE/kdepim/kmobiletools/kmobiletools
Matthias Lechner
matthias at lmme.de
Sat Jun 30 16:59:34 CEST 2007
SVN commit 681869 by lechner:
Adding a first error handling draft.
The idea is to define an error hierarchy by subclassing Error. To keep error handling simple, we should agree on
a small list of error types and how to build the hierarchy.
To test the new error handler, just write "ErrorHandler::instance()->addError( new Error( __FILE__, __LINE__ ) );"
M +4 -0 libkmobiletools/CMakeLists.txt
M +1 -0 libkmobiletools/engine.cpp
M +1 -0 libkmobiletools/engine.h
M +1 -1 libkmobiletools/enginedata.cpp
M +1 -1 libkmobiletools/enginedata.h
A libkmobiletools/error.cpp [License: GPL (v2+)]
A libkmobiletools/error.h [License: GPL (v2+)]
A libkmobiletools/errorhandler.cpp [License: GPL (v2+)]
A libkmobiletools/errorhandler.h [License: GPL (v2+)]
M +6 -0 mainpart/devicehome.cpp
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/CMakeLists.txt #681868:681869
@@ -18,6 +18,8 @@
engineslist.cpp
homepage.cpp
devicesconfig.cpp
+ error.cpp
+ errorhandler.cpp
# kmobiletools_devices_addons.cpp
kmobiletoolshelper.cpp
overlaywidget.cpp
@@ -56,6 +58,8 @@
kmobiletools_export.h
picksmscenter.h
kmobiletoolshelper.h
+ error.h
+ errorhandler.h
engine.h
sms.h
smslist.h
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/engine.cpp #681868:681869
@@ -1,6 +1,7 @@
/***************************************************************************
Copyright (C) 2007
by Marco Gulino <marco at kmobiletools.org>
+ by Matthias Lechner <matthias at lmme.de>
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
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/engine.h #681868:681869
@@ -1,6 +1,7 @@
/***************************************************************************
Copyright (C) 2007
by Marco Gulino <marco at kmobiletools.org>
+ by Matthias Lechner <matthias at lmme.de>
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
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/enginedata.cpp #681868:681869
@@ -1,8 +1,8 @@
/***************************************************************************
Copyright (C) 2007
by Marco Gulino <marco at kmobiletools.org>
+ by Matthias Lechner <matthias at lmme.de>
-
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
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/libkmobiletools/enginedata.h #681868:681869
@@ -1,8 +1,8 @@
/***************************************************************************
Copyright (C) 2007
by Marco Gulino <marco at kmobiletools.org>
+ by Matthias Lechner <matthias at lmme.de>
-
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
--- trunk/KDE/kdepim/kmobiletools/kmobiletools/mainpart/devicehome.cpp #681868:681869
@@ -83,6 +83,9 @@
#include <libkmobiletools/smslist.h>
#include <libkmobiletools/weaver.h>
+#include <libkmobiletools/errorhandler.h>
+#include <libkmobiletools/error.h>
+
#include "addressdetails.h"
#include "editaddressee.h"
#include "smspart.h"
@@ -165,6 +168,9 @@
l_actionList.append(act);
QTimer::singleShot( 1000, this, SLOT(slotStatusBar() ) );
updateAllContacts();
+
+ ErrorHandler::instance()->addError( new Error( __FILE__, __LINE__ ) );
+
}
#include "devicehome.moc"
More information about the kmobiletools
mailing list