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 | * \inmodule KXmlGui |
18 | * \brief Helper class for KXMLGUIClient::setXMLFile. |
19 | * |
20 | * Finds the xml file with the largest version number and takes |
21 | * care of keeping user settings (from the most local file) |
22 | * like action shortcuts or toolbar customizations. |
23 | * |
24 | * This is about handling upgrades (a new version of the application |
25 | * has been installed, with a new xmlgui file, and the user might have |
26 | * a local modified version of an older xmlgui file). |
27 | */ |
28 | class KXmlGuiVersionHandler |
29 | { |
30 | public: |
31 | explicit KXmlGuiVersionHandler(const QStringList &files); |
32 | |
33 | QString finalFile() const |
34 | { |
35 | return m_file; |
36 | } |
37 | QString finalDocument() const |
38 | { |
39 | return m_doc; |
40 | } |
41 | |
42 | private: |
43 | QString m_file; |
44 | QString m_doc; |
45 | }; |
46 | |
47 | #endif /* KXMLGUIVERSIONHANDLER_P_H */ |
48 | |