~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/kvirc/kvs/kvi_kvs_report.h

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _KVI_KVS_REPORT_H_
2
 
#define _KVI_KVS_REPORT_H_
3
 
//=============================================================================
4
 
//
5
 
//   File : kvi_kvs_report.h
6
 
//   Creation date : Thu 25 Sep 2003 05.12 CEST by Szymon Stefanek
7
 
//
8
 
//   This file is part of the KVirc irc client distribution
9
 
//   Copyright (C) 2003-2008 Szymon Stefanek (pragma at kvirc dot net)
10
 
//
11
 
//   This program is FREE software. You can redistribute it and/or
12
 
//   modify it under the terms of the GNU General Public License
13
 
//   as published by the Free Software Foundation; either version 2
14
 
//   of the License, or (at your opinion) any later version.
15
 
//
16
 
//   This program is distributed in the HOPE that it will be USEFUL,
17
 
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
 
//   See the GNU General Public License for more details.
20
 
//
21
 
//   You should have received a copy of the GNU General Public License
22
 
//   along with this program. If not, write to the Free Software Foundation,
23
 
//   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
 
//
25
 
//=============================================================================
26
 
 
27
 
#include "kvi_settings.h"
28
 
#include "kvi_qstring.h"
29
 
#include "kvi_pointerlist.h"
30
 
 
31
 
class KviWindow;
32
 
 
33
 
class KVIRC_API KviKvsReport
34
 
{
35
 
public:
36
 
        enum Type { RunTimeError, RunTimeWarning, ParserError, ParserWarning };
37
 
public:
38
 
        KviKvsReport(Type t,const QString &szContext,const QString &szMessage,const QString &szLocation,KviWindow * pWindow);
39
 
        ~KviKvsReport();
40
 
protected:
41
 
        Type                  m_eType;
42
 
 
43
 
        // mandatory
44
 
        QString               m_szContext;      // context name (script name, usually)
45
 
        QString               m_szMessage;      // report message, always present
46
 
        QString               m_szLocation;     // line and col description (may be some thing like "at end of input")
47
 
 
48
 
        KviWindow           * m_pWindow;        // the window that the script was attacched to
49
 
 
50
 
        // optional
51
 
        KviPointerList<QString> * m_pCodeListing;   // code listing, if present, it is owned
52
 
        KviPointerList<QString> * m_pCallStack;     // call stack, if present, it is owned
53
 
public:
54
 
        Type type() const { return m_eType; };
55
 
 
56
 
        KviWindow * window(){ return m_pWindow; };
57
 
        const QString & context(){ return m_szContext; };
58
 
        const QString & message(){ return m_szMessage; };
59
 
        const QString & location(){ return m_szLocation; };
60
 
        KviPointerList<QString> * codeListing(){ return m_pCodeListing; };
61
 
        KviPointerList<QString> * callStack(){ return m_pCallStack; };
62
 
 
63
 
        void setContext(const QString &szContext){ m_szContext = szContext; };
64
 
        void setMessage(const QString &szMessage){ m_szMessage = szMessage; };
65
 
        void setLocation(const QString &szLocation){ m_szLocation = szLocation; };
66
 
        void setCodeListing(KviPointerList<QString> * pListing){ m_pCodeListing = pListing; };
67
 
        void setCallStack(KviPointerList<QString> * pStack){ m_pCallStack = pStack; };
68
 
 
69
 
        static void findLineAndCol(const QChar * pBegin,const QChar * pPoint,int &iLine,int &iCol);
70
 
        static void findLineColAndListing(const QChar * pBegin,const QChar * pPoint,int &iLine,int &iCol,KviPointerList<QString> * pListing);
71
 
 
72
 
        static void report(KviKvsReport * r,KviWindow * pOutput);
73
 
};
74
 
 
75
 
#endif //!_KVI_KVS_REPORT_H_