Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konsole / src / tests / PartTest.h
blob4c838b6a6e30aeb2516d3f1b1fdade8a8558f801
1 /*
2 Copyright 2008 by Robert Knight <robertknight@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program 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
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301 USA.
20 #ifndef PARTTEST_H
21 #define PARTTEST_H
23 #include <QtCore/QEventLoop>
24 #include <QtTest>
26 #include <kde_terminal_interface.h>
27 #include <KParts/Part>
29 class QKeyEvent;
30 class QEvent;
32 namespace Konsole
35 class PartTest : public QObject
37 Q_OBJECT
39 private slots:
40 void testShortcutOverride();
41 void testFd();
43 // marked as protected so they are not treated as test cases
44 protected slots:
45 void overrideShortcut(QKeyEvent* event, bool& override);
46 void shortcutTriggered();
48 private:
49 KParts::Part* createPart();
51 // variables for testShortcutOverride()
52 bool _shortcutTriggered;
53 bool _overrideCalled;
54 bool _override;
55 QEventLoop* _shortcutEventLoop;
60 #endif // PARTTEST_H