Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / keditbookmarks / testlink.h
blobf42023c1f3f34dfb31139ae9d4bb4811e8c6d284
1 /* This file is part of the KDE project
2 Copyright (C) 2000 David Faure <faure@kde.org>
3 Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License, or (at your option) version 3.
10 This program 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
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>
19 #ifndef __testlink_h
20 #define __testlink_h
22 #include <QtCore/QObject>
24 #include <kio/job.h>
25 #include <kbookmark.h>
27 #include "bookmarkiterator.h"
29 class TestLinkItrHolder : public BookmarkIteratorHolder {
30 public:
31 static TestLinkItrHolder* self() {
32 if (!s_self) { s_self = new TestLinkItrHolder(); }; return s_self;
34 void addAffectedBookmark( const QString & address );
35 protected:
36 virtual void doItrListChanged();
37 private:
38 TestLinkItrHolder();
39 static TestLinkItrHolder *s_self;
40 QString m_affectedBookmark;
43 class TestLinkItr : public BookmarkIterator
45 Q_OBJECT
47 public:
48 TestLinkItr(QList<KBookmark> bks);
49 ~TestLinkItr();
50 virtual TestLinkItrHolder* holder() const { return TestLinkItrHolder::self(); }
52 public Q_SLOTS:
53 void slotJobResult(KJob *job);
55 private:
56 void setStatus(const QString & text);
57 virtual void doAction();
58 virtual bool isApplicable(const KBookmark &bk) const;
60 KIO::TransferJob *m_job;
61 QString m_oldStatus;
64 #endif