File indexing completed on 2025-01-05 04:54:30

0001 /*
0002   This file is part of KOrganizer.
0003 
0004   SPDX-FileCopyrightText: 2001 Cornelius Schumacher <schumacher@kde.org>
0005   SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
0006 
0007   SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
0008 */
0009 
0010 #include "kocore.h"
0011 
0012 #include <QApplication>
0013 #include <QCommandLineParser>
0014 #include <QDebug>
0015 
0016 int main(int argc, char **argv)
0017 {
0018     QApplication app(argc, argv);
0019     QCommandLineParser parser;
0020     parser.addVersionOption();
0021     parser.addHelpOption();
0022     parser.process(app);
0023 
0024     const QList<KPluginMetaData> plugins = KOCore::self()->availableCalendarDecorations();
0025     for (const auto &plugin : plugins) {
0026         qDebug() << "CalendarDecoration:" << plugin.pluginId() << "(" << plugin.name() << ")";
0027         EventViews::CalendarDecoration::Decoration *p = KOCore::self()->loadCalendarDecoration(plugin);
0028         if (!p) {
0029             qDebug() << "Calendar decoration loading failed.";
0030         } else {
0031             qDebug() << "CALENDAR DECORATION INFO:" << p->info();
0032         }
0033     }
0034     return 0;
0035 }