File indexing completed on 2024-02-25 16:34:28

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Gregor Mitsch : port to KDE5 frameworks
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 
0008 #include "internaloption.h"
0009 #include "option_p.h"
0010 
0011 namespace KSaneCore
0012 {
0013 
0014 InternalOption::InternalOption(BaseOption *option, QObject *parent)
0015     : Option(parent)
0016 {
0017     d->option = option;
0018     connect(d->option, &BaseOption::optionReloaded, this, &Option::optionReloaded);
0019     connect(d->option, &BaseOption::valueChanged, this, &Option::valueChanged);
0020     connect(d->option, &BaseOption::destroyed, this, [=]() {
0021         d->option = nullptr;
0022     });
0023 }
0024 
0025 } // namespace KSaneCore
0026 
0027 #include "moc_internaloption.cpp"