|
| 1 | +/*============================================================================== |
| 2 | +** Copyright (C) 2024-2027 WingSummer |
| 3 | +** |
| 4 | +** Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | +** of this software and associated documentation files (the "Software"), to deal |
| 6 | +** in the Software without restriction, including without limitation the rights |
| 7 | +** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | +** copies of the Software, and to permit persons to whom the Software is |
| 9 | +** furnished to do so. |
| 10 | +** |
| 11 | +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 12 | +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 13 | +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 14 | +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 15 | +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 16 | +** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 17 | +** THE SOFTWARE. |
| 18 | +** ============================================================================= |
| 19 | +*/ |
| 20 | + |
| 21 | +#include "testbadplugin.h" |
| 22 | + |
| 23 | +TestBadPlugin::TestBadPlugin() {} |
| 24 | + |
| 25 | +bool TestBadPlugin::init(const std::unique_ptr<QSettings> &set) { |
| 26 | + Q_UNUSED(set); |
| 27 | + msgCritical( |
| 28 | + nullptr, QStringLiteral("TestBadPlugin"), |
| 29 | + QStringLiteral("Hello, pals! I'm a evil MESSAGEBOX! PLEASE BAN ME!")); |
| 30 | + return true; |
| 31 | +} |
| 32 | + |
| 33 | +void TestBadPlugin::unload(std::unique_ptr<QSettings> &set) { Q_UNUSED(set); } |
| 34 | + |
| 35 | +const QString TestBadPlugin::pluginName() const { |
| 36 | + return QStringLiteral("TestBadPlugin"); |
| 37 | +} |
| 38 | + |
| 39 | +const QString TestBadPlugin::pluginComment() const { |
| 40 | + return QStringLiteral("TestBadPlugin: popup a messagebox when startup!"); |
| 41 | +} |
0 commit comments