KDbMessageTitleSetter

Search for usage in LXR

KDbMessageTitleSetter Class Reference

#include <KDbMessageHandler.h>

Public Member Functions

 KDbMessageTitleSetter (KDbResult *result, const QString &message=QString())
 
 KDbMessageTitleSetter (KDbResultable *resultable, const QString &message=QString())
 

Protected Attributes

QString m_prevMsgTitle
 
KDbResultm_result
 

Detailed Description

Helper for setting temporary message title for an KDbResult object. Message title is a text prepended to error or warning messages. Use it as follows:

KDbMessageTitleSetter ts(&m_result, tr("Terrible error occurred"));

After leaving the current code block, myResultableObject's message title will be set back to the previous value.

Definition at line 96 of file KDbMessageHandler.h.

Constructor & Destructor Documentation

◆ KDbMessageTitleSetter() [1/2]

KDbMessageTitleSetter::KDbMessageTitleSetter ( KDbResult * result,
const QString & message = QString() )
explicit

Definition at line 64 of file KDbMessageHandler.cpp.

◆ KDbMessageTitleSetter() [2/2]

KDbMessageTitleSetter::KDbMessageTitleSetter ( KDbResultable * resultable,
const QString & message = QString() )
explicit

Definition at line 71 of file KDbMessageHandler.cpp.

◆ ~KDbMessageTitleSetter()

KDbMessageTitleSetter::~KDbMessageTitleSetter ( )

Definition at line 78 of file KDbMessageHandler.cpp.

Member Data Documentation

◆ m_prevMsgTitle

QString KDbMessageTitleSetter::m_prevMsgTitle
protected

Definition at line 105 of file KDbMessageHandler.h.

◆ m_result

KDbResult* KDbMessageTitleSetter::m_result
protected

Definition at line 104 of file KDbMessageHandler.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:11:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.