1 | /* |
2 | This file is part of the KDE libraries |
3 | SPDX-FileCopyrightText: 2000 Simon Hausmann <hausmann@kde.org> |
4 | SPDX-FileCopyrightText: 2000 Kurt Granroth <granroth@kde.org> |
5 | SPDX-FileCopyrightText: 2007 David Faure <faure@kde.org> |
6 | |
7 | SPDX-License-Identifier: LGPL-2.0-or-later |
8 | */ |
9 | |
10 | #ifndef KXMLGUIVERSIONHANDLER_P_H |
11 | #define KXMLGUIVERSIONHANDLER_P_H |
12 | |
13 | #include <QStringList> |
14 | |
15 | /** |
16 | * @internal |
17 | * Helper class for KXMLGUIClient::setXMLFile |
18 | * Finds the xml file with the largest version number and takes |
19 | * care of keeping user settings (from the most local file) |
20 | * like action shortcuts or toolbar customizations. |
21 | * |
22 | * This is about handling upgrades (a new version of the application |
23 | * has been installed, with a new xmlgui file, and the user might have |
24 | * a local modified version of an older xmlgui file). |
25 | */ |
26 | class KXmlGuiVersionHandler |
27 | { |
28 | public: |
29 | explicit KXmlGuiVersionHandler(const QStringList &files); |
30 | |
31 | QString finalFile() const |
32 | { |
33 | return m_file; |
34 | } |
35 | QString finalDocument() const |
36 | { |
37 | return m_doc; |
38 | } |
39 | |
40 | private: |
41 | QString m_file; |
42 | QString m_doc; |
43 | }; |
44 | |
45 | #endif /* KXMLGUIVERSIONHANDLER_P_H */ |
46 | |