By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1794
Collapse All | Expand All

(-)tdebase/CMakeLists.txt (-2 / +2 lines)
Lines 171-177 Link Here
171
option( BUILD_KFIND "Build kfind" ${BUILD_ALL} )
171
option( BUILD_KFIND "Build kfind" ${BUILD_ALL} )
172
option( BUILD_DRKONQI "Build drkonqi" ${BUILD_ALL} )
172
option( BUILD_DRKONQI "Build drkonqi" ${BUILD_ALL} )
173
option( BUILD_KDCOP "Build kdcop" ${BUILD_ALL} )
173
option( BUILD_KDCOP "Build kdcop" ${BUILD_ALL} )
174
option( BUILD_KDEBUGDIALOG "Build kdebugdialog" ${BUILD_ALL} )
174
option( BUILD_TDEDEBUGDIALOG "Build tdedebugdialog" ${BUILD_ALL} )
175
option( BUILD_KNETATTACH "Build knetattach" ${BUILD_ALL} )
175
option( BUILD_KNETATTACH "Build knetattach" ${BUILD_ALL} )
176
option( BUILD_KPAGER "Build kpager" ${BUILD_ALL} )
176
option( BUILD_KPAGER "Build kpager" ${BUILD_ALL} )
177
option( BUILD_KAPPFINDER "Build kappfinder" ${BUILD_ALL} )
177
option( BUILD_KAPPFINDER "Build kappfinder" ${BUILD_ALL} )
Lines 250-256 Link Here
250
tde_conditional_add_subdirectory( BUILD_KFIND kfind )
250
tde_conditional_add_subdirectory( BUILD_KFIND kfind )
251
tde_conditional_add_subdirectory( BUILD_DRKONQI drkonqi )
251
tde_conditional_add_subdirectory( BUILD_DRKONQI drkonqi )
252
tde_conditional_add_subdirectory( BUILD_KDCOP kdcop )
252
tde_conditional_add_subdirectory( BUILD_KDCOP kdcop )
253
tde_conditional_add_subdirectory( BUILD_KDEBUGDIALOG kdebugdialog )
253
tde_conditional_add_subdirectory( BUILD_TDEDEBUGDIALOG tdedebugdialog )
254
tde_conditional_add_subdirectory( BUILD_KNETATTACH knetattach )
254
tde_conditional_add_subdirectory( BUILD_KNETATTACH knetattach )
255
tde_conditional_add_subdirectory( BUILD_KPAGER kpager )
255
tde_conditional_add_subdirectory( BUILD_KPAGER kpager )
256
tde_conditional_add_subdirectory( BUILD_KAPPFINDER kappfinder )
256
tde_conditional_add_subdirectory( BUILD_KAPPFINDER kappfinder )
(-)tdebase/README (-1 / +1 lines)
Lines 47-53 Link Here
47
* kdcop
47
* kdcop
48
    GUI app to browse for DCOP interfaces, can also execute them.
48
    GUI app to browse for DCOP interfaces, can also execute them.
49
49
50
* kdebugdialog
50
* tdedebugdialog
51
    Allows you to specify which debug messages you want to see.
51
    Allows you to specify which debug messages you want to see.
52
52
53
* tdeprint
53
* tdeprint
(-)tdebase/doc/kdebugdialog/CMakeLists.txt (-12 lines)
Lines 1-12 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
tde_create_handbook( DESTINATION kdebugdialog )
(-)tdebase/doc/kdebugdialog/Makefile.am (-3 lines)
Lines 1-3 Link Here
1
2
KDE_LANG = en
3
KDE_DOCS = AUTO
(-)tdebase/doc/kdebugdialog/index.docbook (-134 lines)
Lines 1-134 Link Here
1
<?xml version="1.0" ?>
2
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
3
"dtd/kdex.dtd" [
4
  <!ENTITY kdebugdialog "<application>KDebugDialog</application>">
5
  <!ENTITY kappname "&kdebugdialog;">
6
  <!ENTITY % addindex "IGNORE">
7
  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
8
  
9
  
10
]>
11
12
<book lang="&language;">
13
<bookinfo>
14
<title>The &kdebugdialog; Handbook</title>
15
16
<authorgroup>
17
<author>&David.Faure; &David.Faure.mail;</author>
18
<!-- TRANS:ROLES_OF_TRANSLATORS -->
19
</authorgroup>
20
21
<date>2001-02-13</date>
22
<releaseinfo>0.03.00</releaseinfo>
23
24
<abstract>
25
<para>This document describes &kdebugdialog;.</para>
26
</abstract>
27
28
<keywordset>
29
<keyword>KDE</keyword>
30
<keyword>KDebugdialog</keyword>
31
</keywordset>
32
</bookinfo>
33
34
<chapter id="Introduction">
35
<title>What is KDebugDialog?</title>
36
37
<para>It is a dialog box for managing diagnostic messages at runtime.
38
</para>
39
40
<para>If you simply start <command>kdebugdialog</command>, you will
41
see a list of <quote>areas</quote>, that can be disabled or enabled. A
42
<function>kdDebug(area)</function> call in the code will show
43
something in the debug output only if the area is enabled.</para>
44
45
<note><para>Note that kdWarning, kdError and kdFatal always appear,
46
they are NOT controlled by this setting.</para></note>
47
48
<variablelist>
49
<varlistentry>
50
<term><guilabel>Area</guilabel></term>
51
<listitem>
52
<para>The areas which should only be output. Every message
53
that is not mentioned here will simply not be output (unless
54
this field remains empty, which is the default, and means that all
55
messages should be output). You can enter several areas
56
separated by commas here, and you can also use area ranges with
57
the syntax start-end. Thus a valid entry could be:
58
117,214-289,356-359,221. Do not use whitespaces.</para>
59
</listitem>
60
</varlistentry>
61
</variablelist>
62
63
<para>If you start <command>kdebugdialog</command>
64
<option>--fullmode</option>, then for every severity level you can
65
define separately what should be done with the diagnostic messages of
66
that level, and the same for each debug area.</para>
67
68
<para>In full mode, first you should select the debug area you are
69
interested in from the drop down list at the top.</para>
70
71
<para>You may independently set the output for various types of
72
messages:</para>
73
74
<itemizedlist>
75
<listitem><para><guilabel>Information</guilabel></para></listitem>
76
<listitem><para><guilabel>Warning</guilabel></para></listitem>
77
<listitem><para><guilabel>Error</guilabel></para></listitem>
78
<listitem><para><guilabel>Fatal Error</guilabel></para></listitem>
79
</itemizedlist>
80
81
<para>For each of these types, you can set the following:</para>
82
83
<variablelist>
84
<varlistentry>
85
<term><guilabel>Output to:</guilabel></term>
86
<listitem>
87
<para>In this Combobox, you can choose where the messages
88
should be output. The choices are: <quote>File</quote>, <quote>Message
89
Box</quote>, <quote>Shell</quote> (meaning stderr) and
90
<quote>Syslog</quote>. Please do not direct fatal messages to syslog
91
unless you are the system administrator yourself. The default is
92
<quote>Message Box</quote>.</para> 
93
</listitem>
94
</varlistentry>
95
96
<varlistentry>
97
<term><guilabel>Filename:</guilabel></term>
98
<listitem><para>This is only enabled when you have chosen
99
<quote>File</quote> as the output and provides the name of that file
100
(which is interpreted as relative to the current folder). The
101
default is <filename>kdebug.dbg</filename>.</para>
102
</listitem>
103
</varlistentry>
104
</variablelist>
105
106
<para>Apart from this, you can also tick the checkbox <guilabel>Abort
107
on fatal errors</guilabel>. In this case, if a diagnostic message with
108
the severity level <computeroutput>KDEBUG_FATAL</computeroutput> is
109
output, the application aborts with a SIGABRT after outputting the
110
message.</para>
111
112
<para>When you close the dialog by pressing <guibutton>OK</guibutton>,
113
your entries apply immediately and are saved in
114
<filename>kdebugrc</filename>. When you press
115
<guibutton>Cancel</guibutton>, your entries are discarded and the old
116
ones are restored.</para>
117
118
<para>Credits to Kalle Dalheimer for the original version of
119
&kdebugdialog;</para>
120
121
</chapter>
122
123
&documentation.index; 
124
</book>
125
<!--
126
Local Variables:
127
mode: sgml
128
sgml-omittag: nil
129
sgml-general-insert-case: lower
130
sgml-shorttag: t
131
End:
132
-->
133
134
(-)tdebase/doc/tdedebugdialog/CMakeLists.txt (+12 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
tde_create_handbook( DESTINATION tdedebugdialog )
(-)tdebase/doc/tdedebugdialog/Makefile.am (+3 lines)
Line 0 Link Here
1
2
KDE_LANG = en
3
KDE_DOCS = AUTO
(-)tdebase/doc/tdedebugdialog/index.docbook (+134 lines)
Line 0 Link Here
1
<?xml version="1.0" ?>
2
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
3
"dtd/kdex.dtd" [
4
  <!ENTITY tdedebugdialog "<application>TDEDebugDialog</application>">
5
  <!ENTITY kappname "&tdedebugdialog;">
6
  <!ENTITY % addindex "IGNORE">
7
  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
8
  
9
  
10
]>
11
12
<book lang="&language;">
13
<bookinfo>
14
<title>The &tdedebugdialog; Handbook</title>
15
16
<authorgroup>
17
<author>&David.Faure; &David.Faure.mail;</author>
18
<!-- TRANS:ROLES_OF_TRANSLATORS -->
19
</authorgroup>
20
21
<date>2001-02-13</date>
22
<releaseinfo>0.03.00</releaseinfo>
23
24
<abstract>
25
<para>This document describes &tdedebugdialog;.</para>
26
</abstract>
27
28
<keywordset>
29
<keyword>KDE</keyword>
30
<keyword>TDEDebugdialog</keyword>
31
</keywordset>
32
</bookinfo>
33
34
<chapter id="Introduction">
35
<title>What is TDEDebugDialog?</title>
36
37
<para>It is a dialog box for managing diagnostic messages at runtime.
38
</para>
39
40
<para>If you simply start <command>tdedebugdialog</command>, you will
41
see a list of <quote>areas</quote>, that can be disabled or enabled. A
42
<function>kdDebug(area)</function> call in the code will show
43
something in the debug output only if the area is enabled.</para>
44
45
<note><para>Note that kdWarning, kdError and kdFatal always appear,
46
they are NOT controlled by this setting.</para></note>
47
48
<variablelist>
49
<varlistentry>
50
<term><guilabel>Area</guilabel></term>
51
<listitem>
52
<para>The areas which should only be output. Every message
53
that is not mentioned here will simply not be output (unless
54
this field remains empty, which is the default, and means that all
55
messages should be output). You can enter several areas
56
separated by commas here, and you can also use area ranges with
57
the syntax start-end. Thus a valid entry could be:
58
117,214-289,356-359,221. Do not use whitespaces.</para>
59
</listitem>
60
</varlistentry>
61
</variablelist>
62
63
<para>If you start <command>tdedebugdialog</command>
64
<option>--fullmode</option>, then for every severity level you can
65
define separately what should be done with the diagnostic messages of
66
that level, and the same for each debug area.</para>
67
68
<para>In full mode, first you should select the debug area you are
69
interested in from the drop down list at the top.</para>
70
71
<para>You may independently set the output for various types of
72
messages:</para>
73
74
<itemizedlist>
75
<listitem><para><guilabel>Information</guilabel></para></listitem>
76
<listitem><para><guilabel>Warning</guilabel></para></listitem>
77
<listitem><para><guilabel>Error</guilabel></para></listitem>
78
<listitem><para><guilabel>Fatal Error</guilabel></para></listitem>
79
</itemizedlist>
80
81
<para>For each of these types, you can set the following:</para>
82
83
<variablelist>
84
<varlistentry>
85
<term><guilabel>Output to:</guilabel></term>
86
<listitem>
87
<para>In this Combobox, you can choose where the messages
88
should be output. The choices are: <quote>File</quote>, <quote>Message
89
Box</quote>, <quote>Shell</quote> (meaning stderr) and
90
<quote>Syslog</quote>. Please do not direct fatal messages to syslog
91
unless you are the system administrator yourself. The default is
92
<quote>Message Box</quote>.</para> 
93
</listitem>
94
</varlistentry>
95
96
<varlistentry>
97
<term><guilabel>Filename:</guilabel></term>
98
<listitem><para>This is only enabled when you have chosen
99
<quote>File</quote> as the output and provides the name of that file
100
(which is interpreted as relative to the current folder). The
101
default is <filename>kdebug.dbg</filename>.</para>
102
</listitem>
103
</varlistentry>
104
</variablelist>
105
106
<para>Apart from this, you can also tick the checkbox <guilabel>Abort
107
on fatal errors</guilabel>. In this case, if a diagnostic message with
108
the severity level <computeroutput>KDEBUG_FATAL</computeroutput> is
109
output, the application aborts with a SIGABRT after outputting the
110
message.</para>
111
112
<para>When you close the dialog by pressing <guibutton>OK</guibutton>,
113
your entries apply immediately and are saved in
114
<filename>kdebugrc</filename>. When you press
115
<guibutton>Cancel</guibutton>, your entries are discarded and the old
116
ones are restored.</para>
117
118
<para>Credits to Kalle Dalheimer for the original version of
119
&tdedebugdialog;</para>
120
121
</chapter>
122
123
&documentation.index; 
124
</book>
125
<!--
126
Local Variables:
127
mode: sgml
128
sgml-omittag: nil
129
sgml-general-insert-case: lower
130
sgml-shorttag: t
131
End:
132
-->
133
134
(-)tdebase/doc/userguide/credits-and-license.docbook (-1 / +1 lines)
Lines 105-111 Link Here
105
<itemizedlist>
105
<itemizedlist>
106
<listitem><para>Wrote <xref linkend="configuring-toolbars"/>.</para>
106
<listitem><para>Wrote <xref linkend="configuring-toolbars"/>.</para>
107
</listitem>
107
</listitem>
108
<listitem><para>Wrote <xref linkend="kdebugdialog" />.</para>
108
<listitem><para>Wrote <xref linkend="tdedebugdialog" />.</para>
109
</listitem>
109
</listitem>
110
</itemizedlist>
110
</itemizedlist>
111
111
(-)tdebase/doc/userguide/under-the-hood.docbook (-11 / +11 lines)
Lines 385-401 Link Here
385
385
386
</sect1>
386
</sect1>
387
387
388
<sect1 id="kdebugdialog">
388
<sect1 id="tdedebugdialog">
389
389
390
<title>&kdebugdialog;  - Controlling &tde;'s Debugging Output</title>
390
<title>&tdedebugdialog;  - Controlling &tde;'s Debugging Output</title>
391
391
392
<sect2 id="kdebugdialog-basic-usage">
392
<sect2 id="tdedebugdialog-basic-usage">
393
<title>Basic Usage</title>
393
<title>Basic Usage</title>
394
394
395
<para>&kdebugdialog; is not in the &kmenu; by default. You will need to run
395
<para>&tdedebugdialog; is not in the &kmenu; by default. You will need to run
396
it from the shell or from the mini-CLI <!-- link to CLI, for sure --> with
396
it from the shell or from the mini-CLI <!-- link to CLI, for sure --> with
397
the command <userinput><command>kdebugdialog</command></userinput>.
397
the command <userinput><command>tdedebugdialog</command></userinput>.
398
&kdebugdialog; pops up a window with a long list of debugging areas. Each
398
&tdedebugdialog; pops up a window with a long list of debugging areas. Each
399
area has a checkbox that you can check or uncheck <!-- perhaps
399
area has a checkbox that you can check or uncheck <!-- perhaps
400
select/deselect --> in order to enable or disable debugging output for
400
select/deselect --> in order to enable or disable debugging output for
401
that part of &tde;.</para>
401
that part of &tde;.</para>
Lines 416-428 Link Here
416
very little.</para>
416
very little.</para>
417
</sect2>
417
</sect2>
418
418
419
<sect2 id="kdebugdialog-fullmode">
419
<sect2 id="tdedebugdialog-fullmode">
420
<title>KDebugDialog in full mode</title>
420
<title>TDEDebugDialog in full mode</title>
421
421
422
<!-- this text partly taken from the kdebugdialog handbook -->
422
<!-- this text partly taken from the tdedebugdialog handbook -->
423
423
424
<para>In full mode, which is what you get when you start kdebugdialog as
424
<para>In full mode, which is what you get when you start tdedebugdialog as
425
<userinput><command>kdebugdialog</command>
425
<userinput><command>tdedebugdialog</command>
426
<option>--fullmode</option></userinput>, the same list of debugging areas
426
<option>--fullmode</option></userinput>, the same list of debugging areas
427
as in plain mode is available, but you can select only one at a time from a
427
as in plain mode is available, but you can select only one at a time from a
428
drop-down <!-- combo? --> box. You may then  independently set the output
428
drop-down <!-- combo? --> box. You may then  independently set the output
(-)tdebase/kdebugdialog/CMakeLists.txt (-32 lines)
Lines 1-32 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
include_directories(
13
  ${CMAKE_CURRENT_BINARY_DIR}
14
  ${CMAKE_BINARY_DIR}
15
  ${TDE_INCLUDE_DIR}
16
  ${TQT_INCLUDE_DIRS}
17
)
18
19
link_directories(
20
  ${TQT_LIBRARY_DIRS}
21
)
22
23
24
##### kdebugdialog (executable) #################
25
26
tde_add_executable( kdebugdialog AUTOMOC
27
  SOURCES
28
    main.cpp kabstractdebugdialog.cpp kdebugdialog.cpp
29
    tdelistdebugdialog.cpp
30
  LINK tdeui-shared
31
  DESTINATION ${BIN_INSTALL_DIR}
32
)
(-)tdebase/kdebugdialog/Makefile.am (-16 lines)
Lines 1-16 Link Here
1
## Makefile.am of kdebugdialog
2
3
INCLUDES=	$(all_includes)
4
5
####### Files
6
7
bin_PROGRAMS = kdebugdialog
8
9
kdebugdialog_SOURCES = main.cpp kabstractdebugdialog.cpp kdebugdialog.cpp tdelistdebugdialog.cpp
10
kdebugdialog_METASOURCES = AUTO
11
kdebugdialog_LDFLAGS =       $(all_libraries) $(KDE_RPATH)
12
kdebugdialog_LDADD   =       $(LIB_TDEUI)
13
14
messages:
15
	$(XGETTEXT) *.cpp -o $(podir)/kdebugdialog.pot	
16
(-)tdebase/kdebugdialog/README (-12 lines)
Lines 1-12 Link Here
1
kdebugdialog
2
------------
3
4
In --fullmode, you can choose to dump debug output to a file.
5
But keep in mind that multiple programs may be writing to that
6
area (and therefore to that file), so they will always be appending
7
to it and never clearing it. So don't forget to empty it once in a
8
while!
9
10
Your configuration will of course be stored in
11
  $HOME/.trinity/share/config/kdebugrc
12
(-)tdebase/kdebugdialog/kabstractdebugdialog.cpp (-85 lines)
Lines 1-85 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 2000 David Faure <faure@kde.org>
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
20
#include "kabstractdebugdialog.h"
21
#include <tdeconfig.h>
22
#include <kpushbutton.h>
23
#include <tqlayout.h>
24
#include <tdeapplication.h>
25
#include <tdelocale.h>
26
#include <kstdguiitem.h>
27
28
KAbstractDebugDialog::KAbstractDebugDialog( TQWidget *parent, const char *name, bool modal )
29
    : KDialog( parent, name, modal )
30
{
31
    pConfig = new TDEConfig( "kdebugrc" );
32
}
33
34
KAbstractDebugDialog::~KAbstractDebugDialog()
35
{
36
    delete pConfig;
37
}
38
39
void KAbstractDebugDialog::buildButtons( TQVBoxLayout * topLayout )
40
{
41
  TQHBoxLayout *hbox = new TQHBoxLayout( KDialog::spacingHint() );
42
  topLayout->addLayout( hbox );
43
  pHelpButton = new KPushButton( KStdGuiItem::help(), this );
44
  hbox->addWidget( pHelpButton );
45
  hbox->addStretch(10);
46
  TQSpacerItem *spacer = new TQSpacerItem(40, 0);
47
  hbox->addItem(spacer);
48
  pOKButton = new KPushButton( KStdGuiItem::ok(), this );
49
  hbox->addWidget( pOKButton );
50
  pApplyButton = new KPushButton( KStdGuiItem::apply(), this );
51
  hbox->addWidget( pApplyButton );
52
  pCancelButton = new KPushButton( KStdGuiItem::cancel(), this );
53
  hbox->addWidget( pCancelButton );
54
55
  int w1 = pHelpButton->sizeHint().width();
56
  int w2 = pOKButton->sizeHint().width();
57
  int w3 = pCancelButton->sizeHint().width();
58
  int w4 = TQMAX( w1, TQMAX( w2, w3 ) );
59
  int w5 = pApplyButton->sizeHint().width();
60
  w4 = TQMAX(w4, w5);
61
62
  pHelpButton->setFixedWidth( w4 );
63
  pOKButton->setFixedWidth( w4 );
64
  pApplyButton->setFixedWidth( w4 );
65
  pCancelButton->setFixedWidth( w4 );
66
67
  connect( pHelpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotShowHelp() ) );
68
  connect( pOKButton, TQT_SIGNAL( clicked() ), TQT_SLOT( accept() ) );
69
  connect( pApplyButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotApply() ) );
70
  connect( pCancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) );
71
}
72
73
void KAbstractDebugDialog::slotShowHelp()
74
{
75
  if (kapp)
76
    kapp->invokeHelp();
77
}
78
79
void KAbstractDebugDialog::slotApply()
80
{
81
  save();
82
  pConfig->sync();
83
}
84
85
#include "kabstractdebugdialog.moc"
(-)tdebase/kdebugdialog/kabstractdebugdialog.h (-54 lines)
Lines 1-54 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 2000 David Faure <faure@kde.org>
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
20
#ifndef KABSTRACTDEBUGDIALOG__H
21
#define KABSTRACTDEBUGDIALOG__H
22
23
#include <kdialog.h>
24
25
class TDEConfig;
26
class TQVBoxLayout;
27
class KPushButton;
28
29
class KAbstractDebugDialog : public KDialog
30
{
31
  Q_OBJECT
32
public:
33
  KAbstractDebugDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
34
35
  virtual ~KAbstractDebugDialog();
36
37
  virtual void buildButtons(TQVBoxLayout * topLayout);
38
39
  virtual void save() = 0;
40
  TDEConfig * config() { return pConfig; }
41
42
protected slots:
43
  void slotShowHelp();
44
  void slotApply();
45
46
protected:
47
  TDEConfig* pConfig;
48
  KPushButton* pOKButton;
49
  KPushButton* pCancelButton;
50
  KPushButton* pHelpButton;
51
  KPushButton* pApplyButton;
52
};
53
54
#endif
(-)tdebase/kdebugdialog/kdebugdialog.cpp (-260 lines)
Lines 1-260 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
3
   Copyright (C) 1999 David Faure (faure@kde.org)
4
5
   This library is free software; you can redistribute it and/or
6
   modify it under the terms of the GNU Library General Public
7
   License as published by the Free Software Foundation; either
8
   version 2 of the License, or (at your option) any later version.
9
10
   This library is distributed in the hope that it will be useful,
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
   Library General Public License for more details.
14
15
   You should have received a copy of the GNU Library General Public License
16
   along with this library; see the file COPYING.LIB.  If not, write to
17
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
   Boston, MA 02110-1301, USA.
19
*/
20
21
#ifdef HAVE_CONFIG_H
22
#include "config.h"
23
#endif
24
25
#include <tqlayout.h>
26
#include <tqlineedit.h>
27
#include <tqcombobox.h>
28
#include <tqlabel.h>
29
#include <tqgroupbox.h>
30
#include <tqcheckbox.h>
31
#include <tqpushbutton.h>
32
#include <kdebug.h>
33
#include <tdeglobal.h>
34
#include <tdelocale.h>
35
#include <kdialog.h>
36
#include <tdeconfig.h>
37
#include <kseparator.h>
38
#include <tdeapplication.h>
39
#include <dcopclient.h>
40
41
#include "kdebugdialog.h"
42
43
KDebugDialog::KDebugDialog( TQStringList areaList, TQWidget *parent, const char *name, bool modal )
44
  : KAbstractDebugDialog( parent, name, modal )
45
{
46
  setCaption(i18n("Debug Settings"));
47
48
  TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
49
  if( topLayout == 0 ) { return; } // can this happen ?
50
51
  TQLabel * tmpLabel = new TQLabel( i18n("Debug area:"), this );
52
  tmpLabel->setFixedHeight( fontMetrics().lineSpacing() );
53
  topLayout->addWidget( tmpLabel );
54
55
  // Build combo of debug areas
56
  pDebugAreas = new TQComboBox( false, this );
57
  pDebugAreas->setFixedHeight( pDebugAreas->sizeHint().height() );
58
  pDebugAreas->insertStringList( areaList );
59
  topLayout->addWidget( pDebugAreas );
60
61
  TQGridLayout *gbox = new TQGridLayout( 2, 2, KDialog::marginHint() );
62
  if( gbox == 0 ) { return; }
63
  topLayout->addLayout( TQT_TQLAYOUT(gbox) );
64
65
  TQStringList destList;
66
  destList.append( i18n("File") );
67
  destList.append( i18n("Message Box") );
68
  destList.append( i18n("Shell") );
69
  destList.append( i18n("Syslog") );
70
  destList.append( i18n("None") );
71
72
  //
73
  // Upper left frame
74
  //
75
  pInfoGroup = new TQGroupBox( i18n("Information"), this );
76
  gbox->addWidget( pInfoGroup, 0, 0 );
77
  TQVBoxLayout *vbox = new TQVBoxLayout( pInfoGroup, KDialog::spacingHint() );
78
  vbox->addSpacing( fontMetrics().lineSpacing() );
79
  pInfoLabel1 = new TQLabel( i18n("Output to:"), pInfoGroup );
80
  vbox->addWidget( pInfoLabel1 );
81
  pInfoCombo = new TQComboBox( false, pInfoGroup );
82
  connect(pInfoCombo, TQT_SIGNAL(activated(int)),
83
	  this, TQT_SLOT(slotDestinationChanged(int)));
84
  vbox->addWidget( pInfoCombo );
85
  pInfoCombo->insertStringList( destList );
86
  pInfoLabel2 = new TQLabel( i18n("Filename:"), pInfoGroup );
87
  vbox->addWidget( pInfoLabel2 );
88
  pInfoFile = new TQLineEdit( pInfoGroup );
89
  vbox->addWidget( pInfoFile );
90
  /*
91
  pInfoLabel3 = new TQLabel( i18n("Show only area(s):"), pInfoGroup );
92
  vbox->addWidget( pInfoLabel3 );
93
  pInfoShow = new TQLineEdit( pInfoGroup );
94
  vbox->addWidget( pInfoShow );
95
  */
96
97
  //
98
  // Upper right frame
99
  //
100
  pWarnGroup = new TQGroupBox( i18n("Warning"), this );
101
  gbox->addWidget( pWarnGroup, 0, 1 );
102
  vbox = new TQVBoxLayout( pWarnGroup, KDialog::spacingHint() );
103
  vbox->addSpacing( fontMetrics().lineSpacing() );
104
  pWarnLabel1 = new TQLabel( i18n("Output to:"), pWarnGroup );
105
  vbox->addWidget( pWarnLabel1 );
106
  pWarnCombo = new TQComboBox( false, pWarnGroup );
107
  connect(pWarnCombo, TQT_SIGNAL(activated(int)),
108
	  this, TQT_SLOT(slotDestinationChanged(int)));
109
  vbox->addWidget( pWarnCombo );
110
  pWarnCombo->insertStringList( destList );
111
  pWarnLabel2 = new TQLabel( i18n("Filename:"), pWarnGroup );
112
  vbox->addWidget( pWarnLabel2 );
113
  pWarnFile = new TQLineEdit( pWarnGroup );
114
  vbox->addWidget( pWarnFile );
115
  /*
116
  pWarnLabel3 = new TQLabel( i18n("Show only area(s):"), pWarnGroup );
117
  vbox->addWidget( pWarnLabel3 );
118
  pWarnShow = new TQLineEdit( pWarnGroup );
119
  vbox->addWidget( pWarnShow );
120
  */
121
122
  //
123
  // Lower left frame
124
  //
125
  pErrorGroup = new TQGroupBox( i18n("Error"), this );
126
  gbox->addWidget( pErrorGroup, 1, 0 );
127
  vbox = new TQVBoxLayout( pErrorGroup, KDialog::spacingHint() );
128
  vbox->addSpacing( fontMetrics().lineSpacing() );
129
  pErrorLabel1 = new TQLabel( i18n("Output to:"), pErrorGroup );
130
  vbox->addWidget( pErrorLabel1 );
131
  pErrorCombo = new TQComboBox( false, pErrorGroup );
132
  connect(pErrorCombo, TQT_SIGNAL(activated(int)),
133
	  this, TQT_SLOT(slotDestinationChanged(int)));
134
  vbox->addWidget( pErrorCombo );
135
  pErrorCombo->insertStringList( destList );
136
  pErrorLabel2 = new TQLabel( i18n("Filename:"), pErrorGroup );
137
  vbox->addWidget( pErrorLabel2 );
138
  pErrorFile = new TQLineEdit( pErrorGroup );
139
  vbox->addWidget( pErrorFile );
140
  /*
141
  pErrorLabel3 = new TQLabel( i18n("Show only area(s):"), pErrorGroup );
142
  vbox->addWidget( pErrorLabel3 );
143
  pErrorShow = new TQLineEdit( pErrorGroup );
144
  vbox->addWidget( pErrorShow );
145
  */
146
147
  //
148
  // Lower right frame
149
  //
150
  pFatalGroup = new TQGroupBox( i18n("Fatal Error"), this );
151
  gbox->addWidget( pFatalGroup, 1, 1 );
152
  vbox = new TQVBoxLayout( pFatalGroup, KDialog::spacingHint() );
153
  vbox->addSpacing( fontMetrics().lineSpacing() );
154
  pFatalLabel1 = new TQLabel( i18n("Output to:"), pFatalGroup );
155
  vbox->addWidget( pFatalLabel1 );
156
  pFatalCombo = new TQComboBox( false, pFatalGroup );
157
  connect(pFatalCombo, TQT_SIGNAL(activated(int)),
158
	  this, TQT_SLOT(slotDestinationChanged(int)));
159
  vbox->addWidget( pFatalCombo );
160
  pFatalCombo->insertStringList( destList );
161
  pFatalLabel2 = new TQLabel( i18n("Filename:"), pFatalGroup );
162
  vbox->addWidget( pFatalLabel2 );
163
  pFatalFile = new TQLineEdit( pFatalGroup );
164
  vbox->addWidget( pFatalFile );
165
  /*
166
  pFatalLabel3 = new TQLabel( i18n("Show only area(s):"), pFatalGroup );
167
  vbox->addWidget( pFatalLabel3 );
168
  pFatalShow = new TQLineEdit( pFatalGroup );
169
  vbox->addWidget( pFatalShow );
170
  */
171
172
173
  pAbortFatal = new TQCheckBox( i18n("Abort on fatal errors"), this );
174
  topLayout->addWidget(pAbortFatal);
175
176
  topLayout->addStretch();
177
  KSeparator *hline = new KSeparator( KSeparator::HLine, this );
178
  topLayout->addWidget( hline );
179
180
  buildButtons( topLayout );
181
182
  connect( pDebugAreas, TQT_SIGNAL( activated( const TQString &) ),
183
           TQT_SLOT( slotDebugAreaChanged( const TQString & ) ) );
184
185
  // Get initial values ("initial" is understood by the slot)
186
  slotDebugAreaChanged( "0 initial" );
187
  slotDestinationChanged(0);
188
189
  resize( 300, height() );
190
}
191
192
KDebugDialog::~KDebugDialog()
193
{
194
}
195
196
void KDebugDialog::slotDebugAreaChanged( const TQString & text )
197
{
198
  // Save settings from previous page
199
  if ( text != "0 initial" ) // except on first call
200
    save();
201
202
  TQString data = text.simplifyWhiteSpace();
203
  int space = data.find(" ");
204
  if (space == -1)
205
      kdError() << "No space:" << data << endl;
206
207
  bool longOK;
208
  unsigned long number = data.left(space).toULong(&longOK);
209
  if (!longOK)
210
      kdError() << "The first part wasn't a number : " << data << endl;
211
212
  /* Fill dialog fields with values from config data */
213
  pConfig->setGroup( TQString::number( number ) ); // Group name = debug area code
214
  pInfoCombo->setCurrentItem( pConfig->readNumEntry( "InfoOutput", 2 ) );
215
  pInfoFile->setText( pConfig->readPathEntry( "InfoFilename","kdebug.dbg" ) );
216
  //pInfoShow->setText( pConfig->readEntry( "InfoShow" ) );
217
  pWarnCombo->setCurrentItem( pConfig->readNumEntry( "WarnOutput", 2 ) );
218
  pWarnFile->setText( pConfig->readPathEntry( "WarnFilename","kdebug.dbg" ) );
219
  //pWarnShow->setText( pConfig->readEntry( "WarnShow" ) );
220
  pErrorCombo->setCurrentItem( pConfig->readNumEntry( "ErrorOutput", 2 ) );
221
  pErrorFile->setText( pConfig->readPathEntry( "ErrorFilename","kdebug.dbg") );
222
  //pErrorShow->setText( pConfig->readEntry( "ErrorShow" ) );
223
  pFatalCombo->setCurrentItem( pConfig->readNumEntry( "FatalOutput", 2 ) );
224
  pFatalFile->setText( pConfig->readPathEntry("FatalFilename","kdebug.dbg") );
225
  //pFatalShow->setText( pConfig->readEntry( "FatalShow" ) );
226
  pAbortFatal->setChecked( pConfig->readNumEntry( "AbortFatal", 1 ) );
227
  slotDestinationChanged(0);
228
}
229
230
void KDebugDialog::save()
231
{
232
  pConfig->writeEntry( "InfoOutput", pInfoCombo->currentItem() );
233
  pConfig->writePathEntry( "InfoFilename", pInfoFile->text() );
234
  //pConfig->writeEntry( "InfoShow", pInfoShow->text() );
235
  pConfig->writeEntry( "WarnOutput", pWarnCombo->currentItem() );
236
  pConfig->writePathEntry( "WarnFilename", pWarnFile->text() );
237
  //pConfig->writeEntry( "WarnShow", pWarnShow->text() );
238
  pConfig->writeEntry( "ErrorOutput", pErrorCombo->currentItem() );
239
  pConfig->writePathEntry( "ErrorFilename", pErrorFile->text() );
240
  //pConfig->writeEntry( "ErrorShow", pErrorShow->text() );
241
  pConfig->writeEntry( "FatalOutput", pFatalCombo->currentItem() );
242
  pConfig->writePathEntry( "FatalFilename", pFatalFile->text() );
243
  //pConfig->writeEntry( "FatalShow", pFatalShow->text() );
244
  pConfig->writeEntry( "AbortFatal", pAbortFatal->isChecked() );
245
246
  TQByteArray data;
247
  if (!kapp->dcopClient()->send("*", "KDebug", "notifyKDebugConfigChanged()", data))
248
  {
249
    kdError() << "Unable to send DCOP message" << endl;
250
  }
251
}
252
253
void KDebugDialog::slotDestinationChanged(int) {
254
    pInfoFile->setEnabled(pInfoCombo->currentItem() == 0);
255
    pWarnFile->setEnabled(pWarnCombo->currentItem() == 0);
256
    pErrorFile->setEnabled(pErrorCombo->currentItem() == 0);
257
    pFatalFile->setEnabled(pFatalCombo->currentItem() == 0);
258
}
259
260
#include "kdebugdialog.moc"
(-)tdebase/kdebugdialog/kdebugdialog.h (-93 lines)
Lines 1-93 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
#ifndef _KDEBUGDIALOG
20
#define _KDEBUGDIALOG
21
22
#include "kabstractdebugdialog.h"
23
24
class TQLineEdit;
25
class TQComboBox;
26
class TQLabel;
27
class TQGroupBox;
28
class TQCheckBox;
29
class TQPushButton;
30
31
class TDEConfig;
32
33
/**
34
 * Control debug/warning/error/fatal output of TDE applications
35
 *
36
 * This dialog allows control of debugging output for all TDE apps.
37
 *
38
 * @author Kalle Dalheimer (kalle@kde.org)
39
 */
40
class KDebugDialog : public KAbstractDebugDialog
41
{
42
  Q_OBJECT
43
44
public:
45
  KDebugDialog( TQStringList areaList, TQWidget *parent=0, const char *name=0, bool modal=true );
46
  virtual ~KDebugDialog();
47
48
  void save();
49
50
protected slots:
51
  void slotDebugAreaChanged( const TQString & );
52
  void slotDestinationChanged(int);
53
54
private:
55
  TQComboBox* pDebugAreas;
56
  TQGroupBox* pInfoGroup;
57
  TQLabel* pInfoLabel1;
58
  TQComboBox* pInfoCombo;
59
  TQLabel* pInfoLabel2;
60
  TQLineEdit* pInfoFile;
61
  TQLabel* pInfoLabel3;
62
  TQLineEdit* pInfoShow;
63
  TQGroupBox* pWarnGroup;
64
  TQLabel* pWarnLabel1;
65
  TQComboBox* pWarnCombo;
66
  TQLabel* pWarnLabel2;
67
  TQLineEdit* pWarnFile;
68
  TQLabel* pWarnLabel3;
69
  TQLineEdit* pWarnShow;
70
  TQGroupBox* pErrorGroup;
71
  TQLabel* pErrorLabel1;
72
  TQComboBox* pErrorCombo;
73
  TQLabel* pErrorLabel2;
74
  TQLineEdit* pErrorFile;
75
  TQLabel* pErrorLabel3;
76
  TQLineEdit* pErrorShow;
77
  TQGroupBox* pFatalGroup;
78
  TQLabel* pFatalLabel1;
79
  TQComboBox* pFatalCombo;
80
  TQLabel* pFatalLabel2;
81
  TQLineEdit* pFatalFile;
82
  TQLabel* pFatalLabel3;
83
  TQLineEdit* pFatalShow;
84
85
  TQCheckBox* pAbortFatal;
86
87
private:
88
  // Disallow assignment and copy-construction
89
  KDebugDialog( const KDebugDialog& );
90
  KDebugDialog& operator= ( const KDebugDialog& );
91
};
92
93
#endif
(-)tdebase/kdebugdialog/main.cpp (-125 lines)
Lines 1-125 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 2000 David Faure <faure@kde.org>
3
4
   This library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Library General Public
6
   License as published by the Free Software Foundation; either
7
   version 2 of the License, or (at your option) any later version.
8
9
   This library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
14
   You should have received a copy of the GNU Library General Public License
15
   along with this library; see the file COPYING.LIB.  If not, write to
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
   Boston, MA 02110-1301, USA.
18
*/
19
20
#include "kdebugdialog.h"
21
#include "tdelistdebugdialog.h"
22
#include <tdecmdlineargs.h>
23
#include <tdeaboutdata.h>
24
#include <kstandarddirs.h>
25
#include <tqtextstream.h>
26
#include <tdelocale.h>
27
#include <kdebug.h>
28
#include <kuniqueapplication.h>
29
#include <tdeconfig.h>
30
31
#include <tqfile.h>
32
33
TQStringList readAreaList()
34
{
35
  TQStringList lst;
36
  lst.append( "0 (generic)" );
37
38
  TQString confAreasFile = locate( "config", "kdebug.areas" );
39
  TQFile file( confAreasFile );
40
  if (!file.open(IO_ReadOnly)) {
41
    kdWarning() << "Couldn't open " << confAreasFile << endl;
42
    file.close();
43
  }
44
  else
45
  {
46
    TQString data;
47
48
    TQTextStream *ts = new TQTextStream(&file);
49
    ts->setEncoding( TQTextStream::Latin1 );
50
    while (!ts->eof()) {
51
      data = ts->readLine().simplifyWhiteSpace();
52
53
      int pos = data.find("#");
54
      if ( pos != -1 )
55
        data.truncate( pos );
56
57
      if (data.isEmpty())
58
        continue;
59
60
      lst.append( data );
61
    }
62
63
    delete ts;
64
    file.close();
65
  }
66
67
  return lst;
68
}
69
70
static TDECmdLineOptions options[] =
71
{
72
  { "fullmode", I18N_NOOP("Show the fully-fledged dialog instead of the default list dialog"), 0 },
73
  { "on <area>", /*I18N_NOOP TODO*/ "Turn area on", 0 },
74
  { "off <area>", /*I18N_NOOP TODO*/ "Turn area off", 0 },
75
  TDECmdLineLastOption
76
};
77
78
int main(int argc, char ** argv)
79
{
80
  TDEAboutData data( "kdebugdialog", I18N_NOOP( "KDebugDialog"),
81
    "1.0", I18N_NOOP("A dialog box for setting preferences for debug output"),
82
    TDEAboutData::License_GPL, "(c) 2009,2010, Timothy Pearson <kb9vqf@pearsoncomputing.net>");
83
  data.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net");
84
  data.addAuthor("David Faure", I18N_NOOP("Original maintainer/developer"), "faure@kde.org");
85
  TDECmdLineArgs::init( argc, argv, &data );
86
  TDECmdLineArgs::addCmdLineOptions( options );
87
  KUniqueApplication::addCmdLineOptions();
88
  KUniqueApplication app;
89
  TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
90
91
  TQStringList areaList ( readAreaList() );
92
  KAbstractDebugDialog * dialog;
93
  if (args->isSet("fullmode"))
94
      dialog = new KDebugDialog(areaList, 0L);
95
  else
96
  {
97
      TDEListDebugDialog * listdialog = new TDEListDebugDialog(areaList, 0L);
98
      if (args->isSet("on"))
99
      {
100
          listdialog->activateArea( args->getOption("on"), true );
101
          /*listdialog->save();
102
          listdialog->config()->sync();
103
          return 0;*/
104
      } else if ( args->isSet("off") )
105
      {
106
          listdialog->activateArea( args->getOption("off"), false );
107
          /*listdialog->save();
108
          listdialog->config()->sync();
109
          return 0;*/
110
      }
111
      dialog = listdialog;
112
  }
113
114
  /* Show dialog */
115
  int nRet = dialog->exec();
116
  if( nRet == TQDialog::Accepted )
117
  {
118
      dialog->save();
119
      dialog->config()->sync();
120
  }
121
  else
122
    dialog->config()->rollback( true );
123
124
  return 0;
125
}
(-)tdebase/kdebugdialog/tdelistdebugdialog.cpp (-193 lines)
Lines 1-193 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 2000 David Faure <faure@kde.org>
3
4
   This library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Library General Public
6
   License as published by the Free Software Foundation; either
7
   version 2 of the License, or (at your option) any later version.
8
9
   This library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
14
   You should have received a copy of the GNU Library General Public License
15
   along with this library; see the file COPYING.LIB.  If not, write to
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
   Boston, MA 02110-1301, USA.
18
*/
19
20
21
#include "tdelistdebugdialog.h"
22
#include <tdeconfig.h>
23
#include <tdeapplication.h>
24
#include <kdebug.h>
25
#include <tqlayout.h>
26
#include <tqscrollview.h>
27
#include <tqvbox.h>
28
#include <tdelocale.h>
29
#include <tqpushbutton.h>
30
#include <klineedit.h>
31
#include <dcopclient.h>
32
33
TDEListDebugDialog::TDEListDebugDialog( TQStringList areaList, TQWidget *parent, const char *name, bool modal )
34
  : KAbstractDebugDialog( parent, name, modal ),
35
  m_areaList( areaList )
36
{
37
  setCaption(i18n("Debug Settings"));
38
39
  TQVBoxLayout *lay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
40
41
  m_incrSearch = new KLineEdit( this );
42
  lay->addWidget( m_incrSearch );
43
  connect( m_incrSearch, TQT_SIGNAL( textChanged( const TQString& ) ),
44
           TQT_SLOT( generateCheckBoxes( const TQString& ) ) );
45
46
  TQScrollView * scrollView = new TQScrollView( this );
47
  scrollView->setResizePolicy( TQScrollView::AutoOneFit );
48
  lay->addWidget( scrollView );
49
50
  m_box = new TQVBox( scrollView->viewport() );
51
  scrollView->addChild( m_box );
52
53
  generateCheckBoxes( TQString::null );
54
55
  TQHBoxLayout* selectButs = new TQHBoxLayout( lay );
56
  TQPushButton* all = new TQPushButton( i18n("&Select All"), this );
57
  TQPushButton* none = new TQPushButton( i18n("&Deselect All"), this );
58
  selectButs->addWidget( all );
59
  selectButs->addWidget( none );
60
61
  connect( all, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectAll() ) );
62
  connect( none, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deSelectAll() ) );
63
64
  buildButtons( lay );
65
  resize( 350, 400 );
66
}
67
68
void TDEListDebugDialog::generateCheckBoxes( const TQString& filter )
69
{
70
  TQPtrListIterator<TQCheckBox> cb_it ( boxes );
71
  for( ; cb_it.current() ; ++cb_it )
72
  {
73
    if( (*cb_it)->state() != TQButton::NoChange )
74
      m_changes.insert( (*cb_it)->name(), (*cb_it)->isChecked() ? 2 : 4 );
75
  }
76
77
  boxes.setAutoDelete( true );
78
  boxes.clear();
79
  boxes.setAutoDelete( false );
80
81
  TQWidget* taborder = m_incrSearch;
82
  TQStringList::Iterator it = m_areaList.begin();
83
  for ( ; it != m_areaList.end() ; ++it )
84
  {
85
    TQString data = (*it).simplifyWhiteSpace();
86
    if ( filter.isEmpty() || data.lower().contains( filter.lower() ) )
87
    {
88
      int space = data.find(" ");
89
      if (space == -1)
90
        kdError() << "No space:" << data << endl;
91
92
      TQString areaNumber = data.left(space);
93
      //kdDebug() << areaNumber << endl;
94
      TQCheckBox * cb = new TQCheckBox( data, m_box, areaNumber.latin1() );
95
      cb->show();
96
      boxes.append( cb );
97
      setTabOrder( taborder, cb );
98
      taborder = cb;
99
    }
100
  }
101
102
  load();
103
}
104
105
void TDEListDebugDialog::selectAll()
106
{
107
  TQPtrListIterator<TQCheckBox> it ( boxes );
108
  for ( ; it.current() ; ++it ) {
109
    (*it)->setChecked( true );
110
    m_changes.insert( (*it)->name(), 2 );
111
  }
112
}
113
114
void TDEListDebugDialog::deSelectAll()
115
{
116
  TQPtrListIterator<TQCheckBox> it ( boxes );
117
  for ( ; it.current() ; ++it ) {
118
    (*it)->setChecked( false );
119
    m_changes.insert( (*it)->name(), 4 );
120
  }
121
}
122
123
void TDEListDebugDialog::load()
124
{
125
  TQPtrListIterator<TQCheckBox> it ( boxes );
126
  for ( ; it.current() ; ++it )
127
  {
128
      pConfig->setGroup( (*it)->name() ); // Group name = debug area code = cb's name
129
130
      int setting = pConfig->readNumEntry( "InfoOutput", 2 );
131
      // override setting if in m_changes
132
      if( m_changes.find( (*it)->name() ) != m_changes.end() ) {
133
        setting = m_changes[ (*it)->name() ];
134
      }
135
136
      switch (setting) {
137
        case 4: // off
138
          (*it)->setChecked(false);
139
          break;
140
        case 2: //shell
141
          (*it)->setChecked(true);
142
          break;
143
        case 3: //syslog
144
        case 1: //msgbox
145
        case 0: //file
146
        default:
147
          (*it)->setNoChange();
148
          /////// Uses the triState capability of checkboxes
149
          ////// Note: it seems some styles don't draw that correctly (BUG)
150
          break;
151
      }
152
  }
153
}
154
155
void TDEListDebugDialog::save()
156
{
157
  TQPtrListIterator<TQCheckBox> it ( boxes );
158
  for ( ; it.current() ; ++it )
159
  {
160
      pConfig->setGroup( (*it)->name() ); // Group name = debug area code = cb's name
161
      if ( (*it)->state() != TQButton::NoChange )
162
      {
163
          int setting = (*it)->isChecked() ? 2 : 4;
164
          pConfig->writeEntry( "InfoOutput", setting );
165
      }
166
  }
167
  //sync done by main.cpp
168
169
  // send DCOP message to all clients
170
  TQByteArray data;
171
  if (!kapp->dcopClient()->send("*", "KDebug", "notifyKDebugConfigChanged()", data))
172
  {
173
    kdError() << "Unable to send DCOP message" << endl;
174
  }
175
176
  m_changes.clear();
177
}
178
179
void TDEListDebugDialog::activateArea( TQCString area, bool activate )
180
{
181
  TQPtrListIterator<TQCheckBox> it ( boxes );
182
  for ( ; it.current() ; ++it )
183
  {
184
      if ( area == (*it)->name()  // debug area code = cb's name
185
          || (*it)->text().find( TQString::fromLatin1(area) ) != -1 ) // area name included in cb text
186
      {
187
          (*it)->setChecked( activate );
188
          return;
189
      }
190
  }
191
}
192
193
#include "tdelistdebugdialog.moc"
(-)tdebase/kdebugdialog/tdelistdebugdialog.h (-65 lines)
Lines 1-65 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 2000 David Faure <faure@kde.org>
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
20
#ifndef TDELISTDEBUGDIALOG__H
21
#define TDELISTDEBUGDIALOG__H
22
23
#include "kabstractdebugdialog.h"
24
#include <tqcheckbox.h>
25
#include <tqptrlist.h>
26
#include <tqstringlist.h>
27
28
class TQVBox;
29
class KLineEdit;
30
31
/**
32
 * Control debug output of TDE applications
33
 * This dialog offers a reduced functionality compared to the full KDebugDialog
34
 * class, but allows to set debug output on or off to several areas much more easily.
35
 *
36
 * @author David Faure <faure@kde.org>
37
 */
38
class TDEListDebugDialog : public KAbstractDebugDialog
39
{
40
  Q_OBJECT
41
42
public:
43
  TDEListDebugDialog( TQStringList areaList, TQWidget *parent=0, const char *name=0, bool modal=true );
44
  virtual ~TDEListDebugDialog() {}
45
46
  void activateArea( TQCString area, bool activate );
47
48
  virtual void save();
49
50
protected slots:
51
  void selectAll();
52
  void deSelectAll();
53
54
  void generateCheckBoxes( const TQString& filter );
55
56
private:
57
  void load();
58
  TQPtrList<TQCheckBox> boxes;
59
  TQStringList m_areaList;
60
  TQVBox *m_box;
61
  KLineEdit *m_incrSearch;
62
  TQMap<TQCString, int> m_changes;
63
};
64
65
#endif
(-)tdebase/r14-xdg-update (-1 / +6 lines)
Lines 64-70 Link Here
64
# Main script:
64
# Main script:
65
65
66
SCRIPT_NAME="`basename \`readlink -f $0\``"
66
SCRIPT_NAME="`basename \`readlink -f $0\``"
67
SCRIPT_VERSION=201401010
67
SCRIPT_VERSION=201401010
68
68
69
# Allow forced execution of this script regardless of the kdeglobals setting
69
# Allow forced execution of this script regardless of the kdeglobals setting
70
# and allow passing a user home directory as a positional parameter.
70
# and allow passing a user home directory as a positional parameter.
Lines 676-681 Link Here
676
  echo "  kpowersave->tdepowersave"
676
  echo "  kpowersave->tdepowersave"
677
  cp -a $PROFILE_DIR/share/config/kpowersaverc $PROFILE_DIR/share/config/tdepowersaverc 2>/dev/null
677
  cp -a $PROFILE_DIR/share/config/kpowersaverc $PROFILE_DIR/share/config/tdepowersaverc 2>/dev/null
678
fi
678
fi
679
if [ ! -f $PROFILE_DIR/share/config/tdedebugdialogrc ] && [ -f $PROFILE_DIR/share/config/kdebugdialogrc ]; then
680
  Message_Prefix
681
  echo "  kdebugdialog->tdedebugdialog"
682
  cp -a $PROFILE_DIR/share/config/kdebugdialogrc $PROFILE_DIR/share/config/tdedebugdialogrc 2>/dev/null
683
fi
679
684
680
# Disable some features new to R14, otherwise users will see an unfamiliar desktop.
685
# Disable some features new to R14, otherwise users will see an unfamiliar desktop.
681
if [ $($TDEDIR/bin/kreadconfig --file kickerrc --group "General" --key "ShowDeepButtons" --default false) = "false" ]; then
686
if [ $($TDEDIR/bin/kreadconfig --file kickerrc --group "General" --key "ShowDeepButtons" --default false) = "false" ]; then
(-)tdebase/tdedebugdialog/CMakeLists.txt (+32 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010-2011 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
include_directories(
13
  ${CMAKE_CURRENT_BINARY_DIR}
14
  ${CMAKE_BINARY_DIR}
15
  ${TDE_INCLUDE_DIR}
16
  ${TQT_INCLUDE_DIRS}
17
)
18
19
link_directories(
20
  ${TQT_LIBRARY_DIRS}
21
)
22
23
24
##### tdedebugdialog (executable) #################
25
26
tde_add_executable( tdedebugdialog AUTOMOC
27
  SOURCES
28
    main.cpp kabstractdebugdialog.cpp tdedebugdialog.cpp
29
    tdelistdebugdialog.cpp
30
  LINK tdeui-shared
31
  DESTINATION ${BIN_INSTALL_DIR}
32
)
(-)tdebase/tdedebugdialog/Makefile.am (+16 lines)
Line 0 Link Here
1
## Makefile.am of tdedebugdialog
2
3
INCLUDES=	$(all_includes)
4
5
####### Files
6
7
bin_PROGRAMS = tdedebugdialog
8
9
tdedebugdialog_SOURCES = main.cpp kabstractdebugdialog.cpp tdedebugdialog.cpp tdelistdebugdialog.cpp
10
tdedebugdialog_METASOURCES = AUTO
11
tdedebugdialog_LDFLAGS =       $(all_libraries) $(KDE_RPATH)
12
tdedebugdialog_LDADD   =       $(LIB_TDEUI)
13
14
messages:
15
	$(XGETTEXT) *.cpp -o $(podir)/tdedebugdialog.pot	
16
(-)tdebase/tdedebugdialog/README (+12 lines)
Line 0 Link Here
1
tdedebugdialog
2
------------
3
4
In --fullmode, you can choose to dump debug output to a file.
5
But keep in mind that multiple programs may be writing to that
6
area (and therefore to that file), so they will always be appending
7
to it and never clearing it. So don't forget to empty it once in a
8
while!
9
10
Your configuration will of course be stored in
11
  $HOME/.trinity/share/config/kdebugrc
12
(-)tdebase/tdedebugdialog/kabstractdebugdialog.cpp (+85 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 2000 David Faure <faure@kde.org>
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
20
#include "kabstractdebugdialog.h"
21
#include <tdeconfig.h>
22
#include <kpushbutton.h>
23
#include <tqlayout.h>
24
#include <tdeapplication.h>
25
#include <tdelocale.h>
26
#include <kstdguiitem.h>
27
28
KAbstractDebugDialog::KAbstractDebugDialog( TQWidget *parent, const char *name, bool modal )
29
    : KDialog( parent, name, modal )
30
{
31
    pConfig = new TDEConfig( "kdebugrc" );
32
}
33
34
KAbstractDebugDialog::~KAbstractDebugDialog()
35
{
36
    delete pConfig;
37
}
38
39
void KAbstractDebugDialog::buildButtons( TQVBoxLayout * topLayout )
40
{
41
  TQHBoxLayout *hbox = new TQHBoxLayout( KDialog::spacingHint() );
42
  topLayout->addLayout( hbox );
43
  pHelpButton = new KPushButton( KStdGuiItem::help(), this );
44
  hbox->addWidget( pHelpButton );
45
  hbox->addStretch(10);
46
  TQSpacerItem *spacer = new TQSpacerItem(40, 0);
47
  hbox->addItem(spacer);
48
  pOKButton = new KPushButton( KStdGuiItem::ok(), this );
49
  hbox->addWidget( pOKButton );
50
  pApplyButton = new KPushButton( KStdGuiItem::apply(), this );
51
  hbox->addWidget( pApplyButton );
52
  pCancelButton = new KPushButton( KStdGuiItem::cancel(), this );
53
  hbox->addWidget( pCancelButton );
54
55
  int w1 = pHelpButton->sizeHint().width();
56
  int w2 = pOKButton->sizeHint().width();
57
  int w3 = pCancelButton->sizeHint().width();
58
  int w4 = TQMAX( w1, TQMAX( w2, w3 ) );
59
  int w5 = pApplyButton->sizeHint().width();
60
  w4 = TQMAX(w4, w5);
61
62
  pHelpButton->setFixedWidth( w4 );
63
  pOKButton->setFixedWidth( w4 );
64
  pApplyButton->setFixedWidth( w4 );
65
  pCancelButton->setFixedWidth( w4 );
66
67
  connect( pHelpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotShowHelp() ) );
68
  connect( pOKButton, TQT_SIGNAL( clicked() ), TQT_SLOT( accept() ) );
69
  connect( pApplyButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotApply() ) );
70
  connect( pCancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) );
71
}
72
73
void KAbstractDebugDialog::slotShowHelp()
74
{
75
  if (kapp)
76
    kapp->invokeHelp();
77
}
78
79
void KAbstractDebugDialog::slotApply()
80
{
81
  save();
82
  pConfig->sync();
83
}
84
85
#include "kabstractdebugdialog.moc"
(-)tdebase/tdedebugdialog/kabstractdebugdialog.h (+54 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 2000 David Faure <faure@kde.org>
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
20
#ifndef KABSTRACTDEBUGDIALOG__H
21
#define KABSTRACTDEBUGDIALOG__H
22
23
#include <kdialog.h>
24
25
class TDEConfig;
26
class TQVBoxLayout;
27
class KPushButton;
28
29
class KAbstractDebugDialog : public KDialog
30
{
31
  Q_OBJECT
32
public:
33
  KAbstractDebugDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
34
35
  virtual ~KAbstractDebugDialog();
36
37
  virtual void buildButtons(TQVBoxLayout * topLayout);
38
39
  virtual void save() = 0;
40
  TDEConfig * config() { return pConfig; }
41
42
protected slots:
43
  void slotShowHelp();
44
  void slotApply();
45
46
protected:
47
  TDEConfig* pConfig;
48
  KPushButton* pOKButton;
49
  KPushButton* pCancelButton;
50
  KPushButton* pHelpButton;
51
  KPushButton* pApplyButton;
52
};
53
54
#endif
(-)tdebase/tdedebugdialog/main.cpp (+125 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 2000 David Faure <faure@kde.org>
3
4
   This library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Library General Public
6
   License as published by the Free Software Foundation; either
7
   version 2 of the License, or (at your option) any later version.
8
9
   This library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
14
   You should have received a copy of the GNU Library General Public License
15
   along with this library; see the file COPYING.LIB.  If not, write to
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
   Boston, MA 02110-1301, USA.
18
*/
19
20
#include "tdedebugdialog.h"
21
#include "tdelistdebugdialog.h"
22
#include <tdecmdlineargs.h>
23
#include <tdeaboutdata.h>
24
#include <kstandarddirs.h>
25
#include <tqtextstream.h>
26
#include <tdelocale.h>
27
#include <kdebug.h>
28
#include <kuniqueapplication.h>
29
#include <tdeconfig.h>
30
31
#include <tqfile.h>
32
33
TQStringList readAreaList()
34
{
35
  TQStringList lst;
36
  lst.append( "0 (generic)" );
37
38
  TQString confAreasFile = locate( "config", "kdebug.areas" );
39
  TQFile file( confAreasFile );
40
  if (!file.open(IO_ReadOnly)) {
41
    kdWarning() << "Couldn't open " << confAreasFile << endl;
42
    file.close();
43
  }
44
  else
45
  {
46
    TQString data;
47
48
    TQTextStream *ts = new TQTextStream(&file);
49
    ts->setEncoding( TQTextStream::Latin1 );
50
    while (!ts->eof()) {
51
      data = ts->readLine().simplifyWhiteSpace();
52
53
      int pos = data.find("#");
54
      if ( pos != -1 )
55
        data.truncate( pos );
56
57
      if (data.isEmpty())
58
        continue;
59
60
      lst.append( data );
61
    }
62
63
    delete ts;
64
    file.close();
65
  }
66
67
  return lst;
68
}
69
70
static TDECmdLineOptions options[] =
71
{
72
  { "fullmode", I18N_NOOP("Show the fully-fledged dialog instead of the default list dialog"), 0 },
73
  { "on <area>", /*I18N_NOOP TODO*/ "Turn area on", 0 },
74
  { "off <area>", /*I18N_NOOP TODO*/ "Turn area off", 0 },
75
  TDECmdLineLastOption
76
};
77
78
int main(int argc, char ** argv)
79
{
80
  TDEAboutData data( "tdedebugdialog", I18N_NOOP( "TDEDebugDialog"),
81
    "1.0", I18N_NOOP("A dialog box for setting preferences for debug output"),
82
    TDEAboutData::License_GPL, "(c) 2009,2010, Timothy Pearson <kb9vqf@pearsoncomputing.net>");
83
  data.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net");
84
  data.addAuthor("David Faure", I18N_NOOP("Original maintainer/developer"), "faure@kde.org");
85
  TDECmdLineArgs::init( argc, argv, &data );
86
  TDECmdLineArgs::addCmdLineOptions( options );
87
  KUniqueApplication::addCmdLineOptions();
88
  KUniqueApplication app;
89
  TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
90
91
  TQStringList areaList ( readAreaList() );
92
  KAbstractDebugDialog * dialog;
93
  if (args->isSet("fullmode"))
94
      dialog = new TDEDebugDialog(areaList, 0L);
95
  else
96
  {
97
      TDEListDebugDialog * listdialog = new TDEListDebugDialog(areaList, 0L);
98
      if (args->isSet("on"))
99
      {
100
          listdialog->activateArea( args->getOption("on"), true );
101
          /*listdialog->save();
102
          listdialog->config()->sync();
103
          return 0;*/
104
      } else if ( args->isSet("off") )
105
      {
106
          listdialog->activateArea( args->getOption("off"), false );
107
          /*listdialog->save();
108
          listdialog->config()->sync();
109
          return 0;*/
110
      }
111
      dialog = listdialog;
112
  }
113
114
  /* Show dialog */
115
  int nRet = dialog->exec();
116
  if( nRet == TQDialog::Accepted )
117
  {
118
      dialog->save();
119
      dialog->config()->sync();
120
  }
121
  else
122
    dialog->config()->rollback( true );
123
124
  return 0;
125
}
(-)tdebase/tdedebugdialog/tdedebugdialog.cpp (+260 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
3
   Copyright (C) 1999 David Faure (faure@kde.org)
4
5
   This library is free software; you can redistribute it and/or
6
   modify it under the terms of the GNU Library General Public
7
   License as published by the Free Software Foundation; either
8
   version 2 of the License, or (at your option) any later version.
9
10
   This library is distributed in the hope that it will be useful,
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
   Library General Public License for more details.
14
15
   You should have received a copy of the GNU Library General Public License
16
   along with this library; see the file COPYING.LIB.  If not, write to
17
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
   Boston, MA 02110-1301, USA.
19
*/
20
21
#ifdef HAVE_CONFIG_H
22
#include "config.h"
23
#endif
24
25
#include <tqlayout.h>
26
#include <tqlineedit.h>
27
#include <tqcombobox.h>
28
#include <tqlabel.h>
29
#include <tqgroupbox.h>
30
#include <tqcheckbox.h>
31
#include <tqpushbutton.h>
32
#include <kdebug.h>
33
#include <tdeglobal.h>
34
#include <tdelocale.h>
35
#include <kdialog.h>
36
#include <tdeconfig.h>
37
#include <kseparator.h>
38
#include <tdeapplication.h>
39
#include <dcopclient.h>
40
41
#include "tdedebugdialog.h"
42
43
TDEDebugDialog::TDEDebugDialog( TQStringList areaList, TQWidget *parent, const char *name, bool modal )
44
  : KAbstractDebugDialog( parent, name, modal )
45
{
46
  setCaption(i18n("Debug Settings"));
47
48
  TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
49
  if( topLayout == 0 ) { return; } // can this happen ?
50
51
  TQLabel * tmpLabel = new TQLabel( i18n("Debug area:"), this );
52
  tmpLabel->setFixedHeight( fontMetrics().lineSpacing() );
53
  topLayout->addWidget( tmpLabel );
54
55
  // Build combo of debug areas
56
  pDebugAreas = new TQComboBox( false, this );
57
  pDebugAreas->setFixedHeight( pDebugAreas->sizeHint().height() );
58
  pDebugAreas->insertStringList( areaList );
59
  topLayout->addWidget( pDebugAreas );
60
61
  TQGridLayout *gbox = new TQGridLayout( 2, 2, KDialog::marginHint() );
62
  if( gbox == 0 ) { return; }
63
  topLayout->addLayout( TQT_TQLAYOUT(gbox) );
64
65
  TQStringList destList;
66
  destList.append( i18n("File") );
67
  destList.append( i18n("Message Box") );
68
  destList.append( i18n("Shell") );
69
  destList.append( i18n("Syslog") );
70
  destList.append( i18n("None") );
71
72
  //
73
  // Upper left frame
74
  //
75
  pInfoGroup = new TQGroupBox( i18n("Information"), this );
76
  gbox->addWidget( pInfoGroup, 0, 0 );
77
  TQVBoxLayout *vbox = new TQVBoxLayout( pInfoGroup, KDialog::spacingHint() );
78
  vbox->addSpacing( fontMetrics().lineSpacing() );
79
  pInfoLabel1 = new TQLabel( i18n("Output to:"), pInfoGroup );
80
  vbox->addWidget( pInfoLabel1 );
81
  pInfoCombo = new TQComboBox( false, pInfoGroup );
82
  connect(pInfoCombo, TQT_SIGNAL(activated(int)),
83
	  this, TQT_SLOT(slotDestinationChanged(int)));
84
  vbox->addWidget( pInfoCombo );
85
  pInfoCombo->insertStringList( destList );
86
  pInfoLabel2 = new TQLabel( i18n("Filename:"), pInfoGroup );
87
  vbox->addWidget( pInfoLabel2 );
88
  pInfoFile = new TQLineEdit( pInfoGroup );
89
  vbox->addWidget( pInfoFile );
90
  /*
91
  pInfoLabel3 = new TQLabel( i18n("Show only area(s):"), pInfoGroup );
92
  vbox->addWidget( pInfoLabel3 );
93
  pInfoShow = new TQLineEdit( pInfoGroup );
94
  vbox->addWidget( pInfoShow );
95
  */
96
97
  //
98
  // Upper right frame
99
  //
100
  pWarnGroup = new TQGroupBox( i18n("Warning"), this );
101
  gbox->addWidget( pWarnGroup, 0, 1 );
102
  vbox = new TQVBoxLayout( pWarnGroup, KDialog::spacingHint() );
103
  vbox->addSpacing( fontMetrics().lineSpacing() );
104
  pWarnLabel1 = new TQLabel( i18n("Output to:"), pWarnGroup );
105
  vbox->addWidget( pWarnLabel1 );
106
  pWarnCombo = new TQComboBox( false, pWarnGroup );
107
  connect(pWarnCombo, TQT_SIGNAL(activated(int)),
108
	  this, TQT_SLOT(slotDestinationChanged(int)));
109
  vbox->addWidget( pWarnCombo );
110
  pWarnCombo->insertStringList( destList );
111
  pWarnLabel2 = new TQLabel( i18n("Filename:"), pWarnGroup );
112
  vbox->addWidget( pWarnLabel2 );
113
  pWarnFile = new TQLineEdit( pWarnGroup );
114
  vbox->addWidget( pWarnFile );
115
  /*
116
  pWarnLabel3 = new TQLabel( i18n("Show only area(s):"), pWarnGroup );
117
  vbox->addWidget( pWarnLabel3 );
118
  pWarnShow = new TQLineEdit( pWarnGroup );
119
  vbox->addWidget( pWarnShow );
120
  */
121
122
  //
123
  // Lower left frame
124
  //
125
  pErrorGroup = new TQGroupBox( i18n("Error"), this );
126
  gbox->addWidget( pErrorGroup, 1, 0 );
127
  vbox = new TQVBoxLayout( pErrorGroup, KDialog::spacingHint() );
128
  vbox->addSpacing( fontMetrics().lineSpacing() );
129
  pErrorLabel1 = new TQLabel( i18n("Output to:"), pErrorGroup );
130
  vbox->addWidget( pErrorLabel1 );
131
  pErrorCombo = new TQComboBox( false, pErrorGroup );
132
  connect(pErrorCombo, TQT_SIGNAL(activated(int)),
133
	  this, TQT_SLOT(slotDestinationChanged(int)));
134
  vbox->addWidget( pErrorCombo );
135
  pErrorCombo->insertStringList( destList );
136
  pErrorLabel2 = new TQLabel( i18n("Filename:"), pErrorGroup );
137
  vbox->addWidget( pErrorLabel2 );
138
  pErrorFile = new TQLineEdit( pErrorGroup );
139
  vbox->addWidget( pErrorFile );
140
  /*
141
  pErrorLabel3 = new TQLabel( i18n("Show only area(s):"), pErrorGroup );
142
  vbox->addWidget( pErrorLabel3 );
143
  pErrorShow = new TQLineEdit( pErrorGroup );
144
  vbox->addWidget( pErrorShow );
145
  */
146
147
  //
148
  // Lower right frame
149
  //
150
  pFatalGroup = new TQGroupBox( i18n("Fatal Error"), this );
151
  gbox->addWidget( pFatalGroup, 1, 1 );
152
  vbox = new TQVBoxLayout( pFatalGroup, KDialog::spacingHint() );
153
  vbox->addSpacing( fontMetrics().lineSpacing() );
154
  pFatalLabel1 = new TQLabel( i18n("Output to:"), pFatalGroup );
155
  vbox->addWidget( pFatalLabel1 );
156
  pFatalCombo = new TQComboBox( false, pFatalGroup );
157
  connect(pFatalCombo, TQT_SIGNAL(activated(int)),
158
	  this, TQT_SLOT(slotDestinationChanged(int)));
159
  vbox->addWidget( pFatalCombo );
160
  pFatalCombo->insertStringList( destList );
161
  pFatalLabel2 = new TQLabel( i18n("Filename:"), pFatalGroup );
162
  vbox->addWidget( pFatalLabel2 );
163
  pFatalFile = new TQLineEdit( pFatalGroup );
164
  vbox->addWidget( pFatalFile );
165
  /*
166
  pFatalLabel3 = new TQLabel( i18n("Show only area(s):"), pFatalGroup );
167
  vbox->addWidget( pFatalLabel3 );
168
  pFatalShow = new TQLineEdit( pFatalGroup );
169
  vbox->addWidget( pFatalShow );
170
  */
171
172
173
  pAbortFatal = new TQCheckBox( i18n("Abort on fatal errors"), this );
174
  topLayout->addWidget(pAbortFatal);
175
176
  topLayout->addStretch();
177
  KSeparator *hline = new KSeparator( KSeparator::HLine, this );
178
  topLayout->addWidget( hline );
179
180
  buildButtons( topLayout );
181
182
  connect( pDebugAreas, TQT_SIGNAL( activated( const TQString &) ),
183
           TQT_SLOT( slotDebugAreaChanged( const TQString & ) ) );
184
185
  // Get initial values ("initial" is understood by the slot)
186
  slotDebugAreaChanged( "0 initial" );
187
  slotDestinationChanged(0);
188
189
  resize( 300, height() );
190
}
191
192
TDEDebugDialog::~TDEDebugDialog()
193
{
194
}
195
196
void TDEDebugDialog::slotDebugAreaChanged( const TQString & text )
197
{
198
  // Save settings from previous page
199
  if ( text != "0 initial" ) // except on first call
200
    save();
201
202
  TQString data = text.simplifyWhiteSpace();
203
  int space = data.find(" ");
204
  if (space == -1)
205
      kdError() << "No space:" << data << endl;
206
207
  bool longOK;
208
  unsigned long number = data.left(space).toULong(&longOK);
209
  if (!longOK)
210
      kdError() << "The first part wasn't a number : " << data << endl;
211
212
  /* Fill dialog fields with values from config data */
213
  pConfig->setGroup( TQString::number( number ) ); // Group name = debug area code
214
  pInfoCombo->setCurrentItem( pConfig->readNumEntry( "InfoOutput", 2 ) );
215
  pInfoFile->setText( pConfig->readPathEntry( "InfoFilename","kdebug.dbg" ) );
216
  //pInfoShow->setText( pConfig->readEntry( "InfoShow" ) );
217
  pWarnCombo->setCurrentItem( pConfig->readNumEntry( "WarnOutput", 2 ) );
218
  pWarnFile->setText( pConfig->readPathEntry( "WarnFilename","kdebug.dbg" ) );
219
  //pWarnShow->setText( pConfig->readEntry( "WarnShow" ) );
220
  pErrorCombo->setCurrentItem( pConfig->readNumEntry( "ErrorOutput", 2 ) );
221
  pErrorFile->setText( pConfig->readPathEntry( "ErrorFilename","kdebug.dbg") );
222
  //pErrorShow->setText( pConfig->readEntry( "ErrorShow" ) );
223
  pFatalCombo->setCurrentItem( pConfig->readNumEntry( "FatalOutput", 2 ) );
224
  pFatalFile->setText( pConfig->readPathEntry("FatalFilename","kdebug.dbg") );
225
  //pFatalShow->setText( pConfig->readEntry( "FatalShow" ) );
226
  pAbortFatal->setChecked( pConfig->readNumEntry( "AbortFatal", 1 ) );
227
  slotDestinationChanged(0);
228
}
229
230
void TDEDebugDialog::save()
231
{
232
  pConfig->writeEntry( "InfoOutput", pInfoCombo->currentItem() );
233
  pConfig->writePathEntry( "InfoFilename", pInfoFile->text() );
234
  //pConfig->writeEntry( "InfoShow", pInfoShow->text() );
235
  pConfig->writeEntry( "WarnOutput", pWarnCombo->currentItem() );
236
  pConfig->writePathEntry( "WarnFilename", pWarnFile->text() );
237
  //pConfig->writeEntry( "WarnShow", pWarnShow->text() );
238
  pConfig->writeEntry( "ErrorOutput", pErrorCombo->currentItem() );
239
  pConfig->writePathEntry( "ErrorFilename", pErrorFile->text() );
240
  //pConfig->writeEntry( "ErrorShow", pErrorShow->text() );
241
  pConfig->writeEntry( "FatalOutput", pFatalCombo->currentItem() );
242
  pConfig->writePathEntry( "FatalFilename", pFatalFile->text() );
243
  //pConfig->writeEntry( "FatalShow", pFatalShow->text() );
244
  pConfig->writeEntry( "AbortFatal", pAbortFatal->isChecked() );
245
246
  TQByteArray data;
247
  if (!kapp->dcopClient()->send("*", "KDebug", "notifyKDebugConfigChanged()", data))
248
  {
249
    kdError() << "Unable to send DCOP message" << endl;
250
  }
251
}
252
253
void TDEDebugDialog::slotDestinationChanged(int) {
254
    pInfoFile->setEnabled(pInfoCombo->currentItem() == 0);
255
    pWarnFile->setEnabled(pWarnCombo->currentItem() == 0);
256
    pErrorFile->setEnabled(pErrorCombo->currentItem() == 0);
257
    pFatalFile->setEnabled(pFatalCombo->currentItem() == 0);
258
}
259
260
#include "tdedebugdialog.moc"
(-)tdebase/tdedebugdialog/tdedebugdialog.h (+93 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org)
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
#ifndef _TDEDEBUGDIALOG
20
#define _TDEDEBUGDIALOG
21
22
#include "kabstractdebugdialog.h"
23
24
class TQLineEdit;
25
class TQComboBox;
26
class TQLabel;
27
class TQGroupBox;
28
class TQCheckBox;
29
class TQPushButton;
30
31
class TDEConfig;
32
33
/**
34
 * Control debug/warning/error/fatal output of TDE applications
35
 *
36
 * This dialog allows control of debugging output for all TDE apps.
37
 *
38
 * @author Kalle Dalheimer (kalle@kde.org)
39
 */
40
class TDEDebugDialog : public KAbstractDebugDialog
41
{
42
  Q_OBJECT
43
44
public:
45
  TDEDebugDialog( TQStringList areaList, TQWidget *parent=0, const char *name=0, bool modal=true );
46
  virtual ~TDEDebugDialog();
47
48
  void save();
49
50
protected slots:
51
  void slotDebugAreaChanged( const TQString & );
52
  void slotDestinationChanged(int);
53
54
private:
55
  TQComboBox* pDebugAreas;
56
  TQGroupBox* pInfoGroup;
57
  TQLabel* pInfoLabel1;
58
  TQComboBox* pInfoCombo;
59
  TQLabel* pInfoLabel2;
60
  TQLineEdit* pInfoFile;
61
  TQLabel* pInfoLabel3;
62
  TQLineEdit* pInfoShow;
63
  TQGroupBox* pWarnGroup;
64
  TQLabel* pWarnLabel1;
65
  TQComboBox* pWarnCombo;
66
  TQLabel* pWarnLabel2;
67
  TQLineEdit* pWarnFile;
68
  TQLabel* pWarnLabel3;
69
  TQLineEdit* pWarnShow;
70
  TQGroupBox* pErrorGroup;
71
  TQLabel* pErrorLabel1;
72
  TQComboBox* pErrorCombo;
73
  TQLabel* pErrorLabel2;
74
  TQLineEdit* pErrorFile;
75
  TQLabel* pErrorLabel3;
76
  TQLineEdit* pErrorShow;
77
  TQGroupBox* pFatalGroup;
78
  TQLabel* pFatalLabel1;
79
  TQComboBox* pFatalCombo;
80
  TQLabel* pFatalLabel2;
81
  TQLineEdit* pFatalFile;
82
  TQLabel* pFatalLabel3;
83
  TQLineEdit* pFatalShow;
84
85
  TQCheckBox* pAbortFatal;
86
87
private:
88
  // Disallow assignment and copy-construction
89
  TDEDebugDialog( const TDEDebugDialog& );
90
  TDEDebugDialog& operator= ( const TDEDebugDialog& );
91
};
92
93
#endif
(-)tdebase/tdedebugdialog/tdelistdebugdialog.cpp (+193 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 2000 David Faure <faure@kde.org>
3
4
   This library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Library General Public
6
   License as published by the Free Software Foundation; either
7
   version 2 of the License, or (at your option) any later version.
8
9
   This library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
14
   You should have received a copy of the GNU Library General Public License
15
   along with this library; see the file COPYING.LIB.  If not, write to
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
   Boston, MA 02110-1301, USA.
18
*/
19
20
21
#include "tdelistdebugdialog.h"
22
#include <tdeconfig.h>
23
#include <tdeapplication.h>
24
#include <kdebug.h>
25
#include <tqlayout.h>
26
#include <tqscrollview.h>
27
#include <tqvbox.h>
28
#include <tdelocale.h>
29
#include <tqpushbutton.h>
30
#include <klineedit.h>
31
#include <dcopclient.h>
32
33
TDEListDebugDialog::TDEListDebugDialog( TQStringList areaList, TQWidget *parent, const char *name, bool modal )
34
  : KAbstractDebugDialog( parent, name, modal ),
35
  m_areaList( areaList )
36
{
37
  setCaption(i18n("Debug Settings"));
38
39
  TQVBoxLayout *lay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
40
41
  m_incrSearch = new KLineEdit( this );
42
  lay->addWidget( m_incrSearch );
43
  connect( m_incrSearch, TQT_SIGNAL( textChanged( const TQString& ) ),
44
           TQT_SLOT( generateCheckBoxes( const TQString& ) ) );
45
46
  TQScrollView * scrollView = new TQScrollView( this );
47
  scrollView->setResizePolicy( TQScrollView::AutoOneFit );
48
  lay->addWidget( scrollView );
49
50
  m_box = new TQVBox( scrollView->viewport() );
51
  scrollView->addChild( m_box );
52
53
  generateCheckBoxes( TQString::null );
54
55
  TQHBoxLayout* selectButs = new TQHBoxLayout( lay );
56
  TQPushButton* all = new TQPushButton( i18n("&Select All"), this );
57
  TQPushButton* none = new TQPushButton( i18n("&Deselect All"), this );
58
  selectButs->addWidget( all );
59
  selectButs->addWidget( none );
60
61
  connect( all, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectAll() ) );
62
  connect( none, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deSelectAll() ) );
63
64
  buildButtons( lay );
65
  resize( 350, 400 );
66
}
67
68
void TDEListDebugDialog::generateCheckBoxes( const TQString& filter )
69
{
70
  TQPtrListIterator<TQCheckBox> cb_it ( boxes );
71
  for( ; cb_it.current() ; ++cb_it )
72
  {
73
    if( (*cb_it)->state() != TQButton::NoChange )
74
      m_changes.insert( (*cb_it)->name(), (*cb_it)->isChecked() ? 2 : 4 );
75
  }
76
77
  boxes.setAutoDelete( true );
78
  boxes.clear();
79
  boxes.setAutoDelete( false );
80
81
  TQWidget* taborder = m_incrSearch;
82
  TQStringList::Iterator it = m_areaList.begin();
83
  for ( ; it != m_areaList.end() ; ++it )
84
  {
85
    TQString data = (*it).simplifyWhiteSpace();
86
    if ( filter.isEmpty() || data.lower().contains( filter.lower() ) )
87
    {
88
      int space = data.find(" ");
89
      if (space == -1)
90
        kdError() << "No space:" << data << endl;
91
92
      TQString areaNumber = data.left(space);
93
      //kdDebug() << areaNumber << endl;
94
      TQCheckBox * cb = new TQCheckBox( data, m_box, areaNumber.latin1() );
95
      cb->show();
96
      boxes.append( cb );
97
      setTabOrder( taborder, cb );
98
      taborder = cb;
99
    }
100
  }
101
102
  load();
103
}
104
105
void TDEListDebugDialog::selectAll()
106
{
107
  TQPtrListIterator<TQCheckBox> it ( boxes );
108
  for ( ; it.current() ; ++it ) {
109
    (*it)->setChecked( true );
110
    m_changes.insert( (*it)->name(), 2 );
111
  }
112
}
113
114
void TDEListDebugDialog::deSelectAll()
115
{
116
  TQPtrListIterator<TQCheckBox> it ( boxes );
117
  for ( ; it.current() ; ++it ) {
118
    (*it)->setChecked( false );
119
    m_changes.insert( (*it)->name(), 4 );
120
  }
121
}
122
123
void TDEListDebugDialog::load()
124
{
125
  TQPtrListIterator<TQCheckBox> it ( boxes );
126
  for ( ; it.current() ; ++it )
127
  {
128
      pConfig->setGroup( (*it)->name() ); // Group name = debug area code = cb's name
129
130
      int setting = pConfig->readNumEntry( "InfoOutput", 2 );
131
      // override setting if in m_changes
132
      if( m_changes.find( (*it)->name() ) != m_changes.end() ) {
133
        setting = m_changes[ (*it)->name() ];
134
      }
135
136
      switch (setting) {
137
        case 4: // off
138
          (*it)->setChecked(false);
139
          break;
140
        case 2: //shell
141
          (*it)->setChecked(true);
142
          break;
143
        case 3: //syslog
144
        case 1: //msgbox
145
        case 0: //file
146
        default:
147
          (*it)->setNoChange();
148
          /////// Uses the triState capability of checkboxes
149
          ////// Note: it seems some styles don't draw that correctly (BUG)
150
          break;
151
      }
152
  }
153
}
154
155
void TDEListDebugDialog::save()
156
{
157
  TQPtrListIterator<TQCheckBox> it ( boxes );
158
  for ( ; it.current() ; ++it )
159
  {
160
      pConfig->setGroup( (*it)->name() ); // Group name = debug area code = cb's name
161
      if ( (*it)->state() != TQButton::NoChange )
162
      {
163
          int setting = (*it)->isChecked() ? 2 : 4;
164
          pConfig->writeEntry( "InfoOutput", setting );
165
      }
166
  }
167
  //sync done by main.cpp
168
169
  // send DCOP message to all clients
170
  TQByteArray data;
171
  if (!kapp->dcopClient()->send("*", "KDebug", "notifyKDebugConfigChanged()", data))
172
  {
173
    kdError() << "Unable to send DCOP message" << endl;
174
  }
175
176
  m_changes.clear();
177
}
178
179
void TDEListDebugDialog::activateArea( TQCString area, bool activate )
180
{
181
  TQPtrListIterator<TQCheckBox> it ( boxes );
182
  for ( ; it.current() ; ++it )
183
  {
184
      if ( area == (*it)->name()  // debug area code = cb's name
185
          || (*it)->text().find( TQString::fromLatin1(area) ) != -1 ) // area name included in cb text
186
      {
187
          (*it)->setChecked( activate );
188
          return;
189
      }
190
  }
191
}
192
193
#include "tdelistdebugdialog.moc"
(-)tdebase/tdedebugdialog/tdelistdebugdialog.h (+65 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
    Copyright (C) 2000 David Faure <faure@kde.org>
3
4
    This library is free software; you can redistribute it and/or
5
    modify it under the terms of the GNU Library General Public
6
    License as published by the Free Software Foundation; either
7
    version 2 of the License, or (at your option) any later version.
8
9
    This library is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
    Library General Public License for more details.
13
14
    You should have received a copy of the GNU Library General Public License
15
    along with this library; see the file COPYING.LIB.  If not, write to
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
    Boston, MA 02110-1301, USA.
18
*/
19
20
#ifndef TDELISTDEBUGDIALOG__H
21
#define TDELISTDEBUGDIALOG__H
22
23
#include "kabstractdebugdialog.h"
24
#include <tqcheckbox.h>
25
#include <tqptrlist.h>
26
#include <tqstringlist.h>
27
28
class TQVBox;
29
class KLineEdit;
30
31
/**
32
 * Control debug output of TDE applications
33
 * This dialog offers a reduced functionality compared to the full TDEDebugDialog
34
 * class, but allows to set debug output on or off to several areas much more easily.
35
 *
36
 * @author David Faure <faure@kde.org>
37
 */
38
class TDEListDebugDialog : public KAbstractDebugDialog
39
{
40
  Q_OBJECT
41
42
public:
43
  TDEListDebugDialog( TQStringList areaList, TQWidget *parent=0, const char *name=0, bool modal=true );
44
  virtual ~TDEListDebugDialog() {}
45
46
  void activateArea( TQCString area, bool activate );
47
48
  virtual void save();
49
50
protected slots:
51
  void selectAll();
52
  void deSelectAll();
53
54
  void generateCheckBoxes( const TQString& filter );
55
56
private:
57
  void load();
58
  TQPtrList<TQCheckBox> boxes;
59
  TQStringList m_areaList;
60
  TQVBox *m_box;
61
  KLineEdit *m_incrSearch;
62
  TQMap<TQCString, int> m_changes;
63
};
64
65
#endif
(-)tdebase/tdeioslave/sftp/DEBUGGING (-1 / +1 lines)
Lines 1-7 Link Here
1
DEBUGGING
1
DEBUGGING
2
2
3
The best way to debug this slave is to send debug info to a
3
The best way to debug this slave is to send debug info to a
4
file using 'kdebugDialog --fullmode'. Then you can 'tail -f' the file to 
4
file using 'tdedebugDialog --fullmode'. Then you can 'tail -f' the file to 
5
see debug messages in real-time.
5
see debug messages in real-time.
6
6
7
I also suggest getting the openssh source and recompiling sftp-server to 
7
I also suggest getting the openssh source and recompiling sftp-server to 

Return to bug 1794