fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kdeui / xmlgui / kxmlguiversionhandler_p.h
blobadd736ba730e1ebbf9e23d7e7a049b984feac1a8
1 /* This file is part of the KDE libraries
2 Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
3 Copyright (C) 2000 Kurt Granroth <granroth@kde.org>
4 Copyright 2007 David Faure <faure@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #ifndef KXMLGUIVERSIONHANDLER_P_H
23 #define KXMLGUIVERSIONHANDLER_P_H
25 #include <QStringList>
27 /**
28 * @internal
29 * Helper class for KXMLGUIClient::setXMLFile
30 * Finds the xml file with the largest version number and takes
31 * care of keeping user settings (from the most local file)
32 * like action shortcuts or toolbar customizations.
34 * This is about handling upgrades (a new version of the application
35 * has been installed, with a new xmlgui file, and the user might have
36 * a local modified version of an older xmlgui file).
38 class KXmlGuiVersionHandler
40 public:
41 KXmlGuiVersionHandler(const QStringList& files);
43 QString finalFile() const { return m_file; }
44 QString finalDocument() const { return m_doc; }
46 static QString findVersionNumber( const QString &xml ); // used by the unit test
48 private:
49 QString m_file;
50 QString m_doc;
53 #endif /* KXMLGUIVERSIONHANDLER_P_H */