Fix minor EBN issues
This commit is contained in:
parent
2abeb42a70
commit
01c4d0411b
20 changed files with 127 additions and 38 deletions
|
@ -117,7 +117,7 @@ private:
|
|||
/**
|
||||
* Tries to parse a single connection message.
|
||||
*
|
||||
* @return True if a message was parsed succesfully.
|
||||
* @return True if a message was parsed successfully.
|
||||
*/
|
||||
bool tryParseMessage();
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/**
|
||||
* Copyright 2013 Albert Vaca <albertvaka@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License or (at your option) version 3 or any later version
|
||||
* accepted by the membership of KDE e.V. (or its successor approved
|
||||
* by the membership of KDE e.V.), which shall act as a proxy
|
||||
* defined in Section 14 of version 3 of the license.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "responsewaiter.h"
|
||||
|
||||
#include <QDBusPendingCall>
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* Copyright 2013 Albert Vaca <albertvaka@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License or (at your option) version 3 or any later version
|
||||
* accepted by the membership of KDE e.V. (or its successor approved
|
||||
* by the membership of KDE e.V.), which shall act as a proxy
|
||||
* defined in Section 14 of version 3 of the license.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef RESPONSE_WAITER_H
|
||||
#define RESPONSE_WAITER_H
|
||||
|
@ -12,19 +31,19 @@ class QDBusPendingCallWatcher;
|
|||
class DBusResponseWaiter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
static DBusResponseWaiter* instance();
|
||||
|
||||
|
||||
///extract QDbusPendingCall from \p variant and blocks until completed
|
||||
Q_INVOKABLE QVariant waitForReply(QVariant variant) const;
|
||||
|
||||
|
||||
const QDBusPendingCall* extractPendingCall(QVariant& variant) const;
|
||||
|
||||
|
||||
private:
|
||||
DBusResponseWaiter();
|
||||
|
||||
|
||||
static DBusResponseWaiter* m_instance;
|
||||
QList<int> m_registered;
|
||||
};
|
||||
|
@ -34,24 +53,24 @@ class DBusAsyncResponse : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool autoDelete READ autodelete WRITE setAutodelete)
|
||||
|
||||
|
||||
public:
|
||||
explicit DBusAsyncResponse(QObject* parent = nullptr);
|
||||
~DBusAsyncResponse() override = default;
|
||||
|
||||
Q_INVOKABLE void setPendingCall(QVariant e);
|
||||
|
||||
|
||||
void setAutodelete(bool b) {m_autodelete = b;};
|
||||
bool autodelete() const {return m_autodelete;}
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
void success(const QVariant& result);
|
||||
void error(const QString& message);
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
void onCallFinished(QDBusPendingCallWatcher* watcher);
|
||||
void onTimeout();
|
||||
|
||||
|
||||
private:
|
||||
QTimer m_timeout;
|
||||
bool m_autodelete;
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "indicatorhelper.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QIcon>
|
||||
|
||||
#include "indicatorhelper.h"
|
||||
|
||||
IndicatorHelper::IndicatorHelper() {}
|
||||
IndicatorHelper::~IndicatorHelper() {}
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef INDICATORHELPER_H
|
||||
#define INDICATORHELPER_H
|
||||
|
||||
#include <QProcess>
|
||||
#include <QSplashScreen>
|
||||
|
||||
|
@ -51,3 +54,5 @@ private:
|
|||
QSplashScreen *m_splashScreen;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -57,7 +57,7 @@ int main(int argc, char** argv)
|
|||
|
||||
helper.preInit();
|
||||
|
||||
// Run Daemon initilization step
|
||||
// Run Daemon initialization step
|
||||
QProcess kdeconnectd;
|
||||
if (helper.daemonHook(kdeconnectd)) {
|
||||
return -1;
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KDECONNECT_INTERFACE_DEBUG_H
|
||||
#define KDECONNECT_INTERFACE_DEBUG_H
|
||||
#ifndef KDECONNECT_INTERFACES_DEBUG_H
|
||||
#define KDECONNECT_INTERFACES_DEBUG_H
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_INTERFACES)
|
||||
|
||||
#endif //KDECONNECT_INTERFACE_DEBUG_H
|
||||
#endif //KDECONNECT_INTERFACES_DEBUG_H
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
** and appearing in the file LICENSE.GPL included in the packaging of
|
||||
** this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
** http://www.trolltech.com/products/qt/opensource.html
|
||||
** https://www.qt.io/download-open-source
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** review the following information:
|
||||
** http://www.trolltech.com/products/qt/licensing.html or contact the
|
||||
** sales department at sales@trolltech.com.
|
||||
** https://www.qt.io/licensing/ or contact the
|
||||
** sales department at https://www.qt.io/contact-us
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
** and appearing in the file LICENSE.GPL included in the packaging of
|
||||
** this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
** http://www.trolltech.com/products/qt/opensource.html
|
||||
** https://www.qt.io/download-open-source
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** review the following information:
|
||||
** http://www.trolltech.com/products/qt/licensing.html or contact the
|
||||
** sales department at sales@trolltech.com.
|
||||
** https://www.qt.io/licensing/ or contact the
|
||||
** sales department at https://www.qt.io/contact-us
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
|
|
@ -238,4 +238,4 @@ bool MacOSRemoteInput::handlePacket(const NetworkPacket& np)
|
|||
|
||||
bool MacOSRemoteInput::hasKeyboardSupport() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,4 +258,4 @@ bool WindowsRemoteInput::handlePacket(const NetworkPacket& np)
|
|||
bool WindowsRemoteInput::hasKeyboardSupport()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,4 +26,4 @@ if(WIN32)
|
|||
target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore)
|
||||
else()
|
||||
target_link_libraries(kdeconnect_mpriscontrol Qt5::DBus kdeconnectcore)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/**
|
||||
* Copyright 2018 Jun Bo Bi <jambonmcyeah@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License or (at your option) version 3 or any later version
|
||||
* accepted by the membership of KDE e.V. (or its successor approved
|
||||
* by the membership of KDE e.V.), which shall act as a proxy
|
||||
* defined in Section 14 of version 3 of the license.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "mpriscontrolplugin-win.h"
|
||||
#include <core/device.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
/**
|
||||
* Copyright 2018 Jun Bo Bi <jambonmcyeah@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License or (at your option) version 3 or any later version
|
||||
* accepted by the membership of KDE e.V. (or its successor approved
|
||||
* by the membership of KDE e.V.), which shall act as a proxy
|
||||
* defined in Section 14 of version 3 of the license.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MPRISCONTROLPLUGINWIN_H
|
||||
#define MPRISCONTROLPLUGINWIN_H
|
||||
|
||||
|
@ -26,4 +46,4 @@ class MprisControlPlugin
|
|||
private:
|
||||
const QString playername = PLAYERNAME;
|
||||
};
|
||||
#endif //MPRISCONTROLPLUGINWIN_H
|
||||
#endif //MPRISCONTROLPLUGINWIN_H
|
||||
|
|
|
@ -42,7 +42,7 @@ Notification::Notification(const NetworkPacket& np, const Device* device, QObjec
|
|||
, m_imagesDir()
|
||||
, m_device(device)
|
||||
{
|
||||
//Make a own directory for each user so noone can see each others icons
|
||||
//Make a own directory for each user so no one can see each others icons
|
||||
QString username;
|
||||
#ifdef Q_OS_WIN
|
||||
username = QString::fromLatin1(qgetenv("USERNAME"));
|
||||
|
@ -63,7 +63,7 @@ Notification::Notification(const NetworkPacket& np, const Device* device, QObjec
|
|||
if(!m_requestReplyId.isEmpty() && actionIndex == 1) {
|
||||
return;
|
||||
}
|
||||
// Notification action idices start at 1
|
||||
// Notification action indices start at 1
|
||||
Q_EMIT actionTriggered(m_internalId, m_actions[actionIndex - 1]);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -55,4 +55,4 @@ private:
|
|||
|
||||
};
|
||||
|
||||
#endif // PAUSEMUSICPLUGINWIN_H
|
||||
#endif // PAUSEMUSICPLUGINWIN_H
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NOTIFICATIONLISTENER_H
|
||||
#define NOTIFICATIONLISTENER_H
|
||||
#ifndef NOTIFICATIONSLISTENER_H
|
||||
#define NOTIFICATIONSLISTENER_H
|
||||
|
||||
#include <QDBusAbstractAdaptor>
|
||||
#include <QDBusArgument>
|
||||
|
@ -66,4 +66,4 @@ private:
|
|||
QString m_translatedAppName;
|
||||
};
|
||||
|
||||
#endif // NOTIFICATIONLISTENER_H
|
||||
#endif // NOTIFICATIONSLISTENER_H
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SFTPPLUGIN_MOUNTJOB_H
|
||||
#define SFTPPLUGIN_MOUNTJOB_H
|
||||
#ifndef SFTPPLUGIN_MOUNTER_H
|
||||
#define SFTPPLUGIN_MOUNTER_H
|
||||
|
||||
#include <KJob>
|
||||
#include <KProcess>
|
||||
|
|
|
@ -96,13 +96,13 @@ Kirigami.ScrollablePage
|
|||
}
|
||||
|
||||
if (!isInitalized) {
|
||||
// If we aren't initalized, we need to request enough messages to fill the view
|
||||
// If we aren't initialized, we need to request enough messages to fill the view
|
||||
// In order to do that, request one more message until we have enough
|
||||
if (viewport.contentHeight < viewport.height) {
|
||||
console.debug("Requesting another message to fill the screen")
|
||||
conversationModel.requestMoreMessages(1)
|
||||
} else {
|
||||
// Finish intializing: Scroll to the bottom of the view
|
||||
// Finish initializing: Scroll to the bottom of the view
|
||||
|
||||
// View the most-recent message
|
||||
viewport.forceLayout()
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TESTDEVICE_H
|
||||
#define TESTDEVICE_H
|
||||
|
||||
#include <QtCore>
|
||||
#include "core/device.h"
|
||||
|
||||
|
@ -58,3 +61,5 @@ public Q_SLOTS:
|
|||
bool sendPacket(NetworkPacket& np) override;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue