diff --git a/src/configoperation_p.h b/src/configoperation_p.h index f69abbd..1769c9b 100644 --- a/src/configoperation_p.h +++ b/src/configoperation_p.h @@ -1,57 +1,57 @@ /* * Copyright (C) 2014 Daniel Vratil * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #include #include "configoperation.h" #include "abstractbackend.h" #include "backendinterface.h" namespace KScreen { class ConfigOperationPrivate : public QObject { Q_OBJECT public: - ConfigOperationPrivate(ConfigOperation *qq); + explicit ConfigOperationPrivate(ConfigOperation *qq); ~ConfigOperationPrivate() override; // For out-of-process void requestBackend(); virtual void backendReady(org::kde::kscreen::Backend *backend); // For in-process KScreen::AbstractBackend* loadBackend(); public Q_SLOTS: void doEmitResult(); private: QString error; bool isExec; protected: ConfigOperation * const q_ptr; Q_DECLARE_PUBLIC(ConfigOperation) }; } diff --git a/src/edid.h b/src/edid.h index 26b082e..7b22aef 100644 --- a/src/edid.h +++ b/src/edid.h @@ -1,88 +1,88 @@ /************************************************************************************* * Copyright (C) 2012 by Daniel Nicoletti * * (C) 2012, 2013 by Daniel Vrátil * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *************************************************************************************/ #ifndef KSCREEN_EDID_H #define KSCREEN_EDID_H #include "kscreen_export.h" #include #include #include namespace KScreen { class KSCREEN_EXPORT Edid: public QObject { Q_OBJECT Q_PROPERTY(QString deviceId READ deviceId CONSTANT) Q_PROPERTY(QString name READ name CONSTANT) Q_PROPERTY(QString vendor READ vendor CONSTANT) Q_PROPERTY(QString serial READ serial CONSTANT) Q_PROPERTY(QString eisaId READ eisaId CONSTANT) Q_PROPERTY(QString hash READ hash CONSTANT) Q_PROPERTY(uint width READ width CONSTANT) Q_PROPERTY(uint height READ height CONSTANT) Q_PROPERTY(qreal gamma READ gamma CONSTANT) Q_PROPERTY(QQuaternion red READ red CONSTANT) Q_PROPERTY(QQuaternion green READ green CONSTANT) Q_PROPERTY(QQuaternion blue READ blue CONSTANT) Q_PROPERTY(QQuaternion white READ white CONSTANT) public: explicit Edid(); explicit Edid(const QByteArray &data, QObject *parent = nullptr); ~Edid() override; Edid* clone() const; bool isValid() const; QString deviceId(const QString &fallbackName = QString()) const; QString name() const; QString vendor() const; QString serial() const; QString eisaId() const; QString hash() const; QString pnpId() const; uint width() const; uint height() const; qreal gamma() const; QQuaternion red() const; QQuaternion green() const; QQuaternion blue() const; QQuaternion white() const; private: Q_DISABLE_COPY(Edid) class Private; Private * const d; - Edid(Private *dd); + explicit Edid(Private *dd); }; } Q_DECLARE_METATYPE(KScreen::Edid*) #endif // EDID_H diff --git a/src/log.h b/src/log.h index b6cb0fe..cceba05 100644 --- a/src/log.h +++ b/src/log.h @@ -1,117 +1,117 @@ /************************************************************************************* * Copyright 2016 by Sebastian Kügler * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *************************************************************************************/ #ifndef KSCREEN_LOG_H #define KSCREEN_LOG_H #include "kscreen_export.h" #include "types.h" #include #include namespace KScreen { void log(const QString& msg); /** KScreen-internal file logging. * * The purpose of this class is to allow better debugging of kscreen. QDebug falls short here, since * we need to debug the concert of kscreen components from different processes. * * KScreen::Log manages access to kscreen's log file. * * The following environment variables are considered: * - disable logging by setting * KSCREEN_LOGGING=false * - set the log file to a custom path, the default is in ~/.local/share/kscreen/kscreen.log * * Please do not translate messages written to the logs, it's developer information and should be * english, independent from the user's locale preferences. * * @code * * Log::instance()->setContext("resume"); * Log::log("Applying detected output configuration."); * * @endcode * * @since 5.8 */ class KSCREEN_EXPORT Log { public: virtual ~Log(); static Log* instance(); /** Log a message to a file * * Call this static method to add a new line to the log. * * @arg msg The log message to write. */ static void log(const QString &msg, const QString &category = QString()); /** Context for the logs. * * The context can be used to indicate what is going on overall, it is used to be able * to group log entries into subsequential operations. For example the context can be * "handling resume", which is then added to the log messages. * * @arg msg The log message to write to the file. * * @see ontext() */ QString context() const; /** Set the context for the logs. * * @see context() */ void setContext(const QString &context); /** Logging to file is enabled by environmental var, is it? * * @arg msg The log message to write to the file. * @return Whether logging is enabled. */ bool enabled() const; /** Path to the log file * * This is usually ~/.local/share/kscreen/kscreen.log, but can be changed by setting * KSCREEN_LOGFILE in the environment. * * @return The path to the log file. */ QString logFile() const; private: explicit Log(); class Private; Private * const d; static Log* sInstance; - Log(Private *dd); + explicit Log(Private *dd); }; } //KSCreen namespace #endif //KSCREEN_LOG_H