mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-22 09:51:06 +00:00
Implement single method capture request
The core now has a method requestCapture, which receives a CaptureRequest object with all the needed information. This reduces code duplication in future features.
This commit is contained in:
@@ -22,12 +22,20 @@
|
||||
#include <QFile>
|
||||
|
||||
DBusUtils::DBusUtils(QObject *parent) : QObject(parent) {
|
||||
m_id = qHash(qApp->arguments().join(" "));
|
||||
}
|
||||
|
||||
DBusUtils::DBusUtils(uint id, QObject *parent) :
|
||||
QObject(parent), m_id(id)
|
||||
{
|
||||
void DBusUtils::connectPrintCapture(QDBusConnection &session, uint id) {
|
||||
m_id = id;
|
||||
// captureTaken
|
||||
session.connect("org.dharkael.Flameshot",
|
||||
"/", "", "captureTaken",
|
||||
this,
|
||||
SLOT(captureTaken(uint, QByteArray)));
|
||||
// captureFailed
|
||||
session.connect("org.dharkael.Flameshot",
|
||||
"/", "", "captureFailed",
|
||||
this,
|
||||
SLOT(captureFailed(uint)));
|
||||
}
|
||||
|
||||
void DBusUtils::checkDBusConnection(const QDBusConnection &c) {
|
||||
|
||||
Reference in New Issue
Block a user