• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

kabc

  • kabc
errorhandler.cpp
1/*
2 This file is part of libkabc.
3
4 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
5 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#include "errorhandler.h"
24
25#include <kdebug.h>
26#include <klocalizedstring.h>
27#include <kmessagebox.h>
28
29#include <QApplication>
30
31using namespace KABC;
32
33ErrorHandler::~ErrorHandler()
34{
35}
36
37ConsoleErrorHandler::ConsoleErrorHandler()
38 : d( 0 )
39{
40}
41
42ConsoleErrorHandler::~ConsoleErrorHandler()
43{
44}
45
46void ConsoleErrorHandler::error( const QString &msg )
47{
48 // no debug area is ok here
49 kError( 5700 ) << msg;
50}
51
52class GuiErrorHandler::Private
53{
54 public:
55 Private( QWidget *widget )
56 : mWidget( widget )
57 {
58 }
59
60 QWidget *mWidget;
61};
62
63GuiErrorHandler::GuiErrorHandler( QWidget *widget )
64 : d( new Private( widget ) )
65{
66}
67
68GuiErrorHandler::~GuiErrorHandler()
69{
70 delete d;
71}
72
73void GuiErrorHandler::error( const QString &msg )
74{
75 if ( qApp ) {
76 KMessageBox::error( d->mWidget, msg );
77 }
78}
KABC::ConsoleErrorHandler::error
virtual void error(const QString &msg)
Show error message.
Definition: errorhandler.cpp:46
KABC::ConsoleErrorHandler::~ConsoleErrorHandler
virtual ~ConsoleErrorHandler()
Destroys the handler instance.
Definition: errorhandler.cpp:42
KABC::ConsoleErrorHandler::ConsoleErrorHandler
ConsoleErrorHandler()
Create an error handler for console output.
Definition: errorhandler.cpp:37
KABC::ErrorHandler::~ErrorHandler
virtual ~ErrorHandler()
Destroys the handler instance.
Definition: errorhandler.cpp:33
KABC::GuiErrorHandler::GuiErrorHandler
GuiErrorHandler(QWidget *parent=0)
Create error handler.
Definition: errorhandler.cpp:63
KABC::GuiErrorHandler::~GuiErrorHandler
virtual ~GuiErrorHandler()
Destroys the handler instance.
Definition: errorhandler.cpp:68
KABC::GuiErrorHandler::error
virtual void error(const QString &msg)
Show error message.
Definition: errorhandler.cpp:73
KABC
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition: address.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

Skip menu "kabc"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal