File indexing completed on 2024-04-21 03:59:42

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2000 Simon Hausmann <hausmann@kde.org>
0004     SPDX-FileCopyrightText: 2000 Kurt Granroth <granroth@kde.org>
0005     SPDX-FileCopyrightText: 2007 David Faure <faure@kde.org>
0006 
0007     SPDX-License-Identifier: LGPL-2.0-or-later
0008 */
0009 
0010 #ifndef KXMLGUIVERSIONHANDLER_P_H
0011 #define KXMLGUIVERSIONHANDLER_P_H
0012 
0013 #include <QStringList>
0014 
0015 /**
0016  * @internal
0017  * Helper class for KXMLGUIClient::setXMLFile
0018  * Finds the xml file with the largest version number and takes
0019  * care of keeping user settings (from the most local file)
0020  * like action shortcuts or toolbar customizations.
0021  *
0022  * This is about handling upgrades (a new version of the application
0023  * has been installed, with a new xmlgui file, and the user might have
0024  * a local modified version of an older xmlgui file).
0025  */
0026 class KXmlGuiVersionHandler
0027 {
0028 public:
0029     explicit KXmlGuiVersionHandler(const QStringList &files);
0030 
0031     QString finalFile() const
0032     {
0033         return m_file;
0034     }
0035     QString finalDocument() const
0036     {
0037         return m_doc;
0038     }
0039 
0040 private:
0041     QString m_file;
0042     QString m_doc;
0043 };
0044 
0045 #endif /* KXMLGUIVERSIONHANDLER_P_H */