Compare commits
No commits in common. "master" and "master" have entirely different histories.
@ -431,7 +431,7 @@ QMap<QString, QVariant> Core::MessageHandler::getChanges(Shared::Message& data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QXmppMessage Core::MessageHandler::createPacket(const Shared::Message& data, const QDateTime& time, const QString& originalId) const {
|
QXmppMessage Core::MessageHandler::createPacket(const Shared::Message& data, const QDateTime& time, const QString& originalId) const {
|
||||||
QXmppMessage msg(QString(), data.getTo(), data.getBody(), data.getThread());
|
QXmppMessage msg(acc->getFullJid(), data.getTo(), data.getBody(), data.getThread());
|
||||||
QString id(data.getId());
|
QString id(data.getId());
|
||||||
|
|
||||||
if (originalId.size() > 0)
|
if (originalId.size() > 0)
|
||||||
|
@ -33,10 +33,10 @@ Core::Squawk::Squawk(QObject* parent):
|
|||||||
state(Shared::Availability::offline),
|
state(Shared::Availability::offline),
|
||||||
network(),
|
network(),
|
||||||
isInitialized(false),
|
isInitialized(false),
|
||||||
|
clientCache(),
|
||||||
#ifdef WITH_KWALLET
|
#ifdef WITH_KWALLET
|
||||||
kwallet(),
|
kwallet()
|
||||||
#endif
|
#endif
|
||||||
clientCache()
|
|
||||||
{
|
{
|
||||||
connect(&network, &NetworkAccess::loadFileProgress, this, &Squawk::fileProgress);
|
connect(&network, &NetworkAccess::loadFileProgress, this, &Squawk::fileProgress);
|
||||||
connect(&network, &NetworkAccess::loadFileError, this, &Squawk::fileError);
|
connect(&network, &NetworkAccess::loadFileError, this, &Squawk::fileError);
|
||||||
|
@ -137,13 +137,12 @@ private:
|
|||||||
Shared::Availability state;
|
Shared::Availability state;
|
||||||
NetworkAccess network;
|
NetworkAccess network;
|
||||||
bool isInitialized;
|
bool isInitialized;
|
||||||
|
ClientCache clientCache;
|
||||||
|
|
||||||
#ifdef WITH_KWALLET
|
#ifdef WITH_KWALLET
|
||||||
PSE::KWallet kwallet;
|
PSE::KWallet kwallet;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ClientCache clientCache;
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void addAccount(
|
void addAccount(
|
||||||
const QString& login,
|
const QString& login,
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef SHARED_DEFINES_H
|
||||||
|
#define SHARED_DEFINES_H
|
||||||
|
|
||||||
#define SHARED_UNUSED(x) (void)(x)
|
#define SHARED_UNUSED(x) (void)(x)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
|
|
||||||
#include "defines.h"
|
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "ui/models/roster.h"
|
#include "ui/models/roster.h"
|
||||||
|
|
||||||
@ -362,32 +361,27 @@ void Shared::Global::highlightInFileManager(const QString& path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QIcon Shared::Global::createThemePreview(const QString& path) {
|
QIcon Shared::Global::createThemePreview(const QString& path) {
|
||||||
#ifdef WITH_KCONFIG
|
|
||||||
if (supported("colorSchemeTools")) {
|
if (supported("colorSchemeTools")) {
|
||||||
QIcon* icon = createPreview(path);
|
QIcon* icon = createPreview(path);
|
||||||
QIcon localIcon = *icon;
|
QIcon localIcon = *icon;
|
||||||
deletePreview(icon);
|
deletePreview(icon);
|
||||||
return localIcon;
|
return localIcon;
|
||||||
}
|
} else {
|
||||||
#endif
|
|
||||||
|
|
||||||
return QIcon();
|
return QIcon();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString Shared::Global::getColorSchemeName(const QString& path) {
|
QString Shared::Global::getColorSchemeName(const QString& path) {
|
||||||
#ifdef WITH_KCONFIG
|
|
||||||
if (supported("colorSchemeTools")) {
|
if (supported("colorSchemeTools")) {
|
||||||
QString res;
|
QString res;
|
||||||
colorSchemeName(path, res);
|
colorSchemeName(path, res);
|
||||||
return res;
|
return res;
|
||||||
}
|
} else {
|
||||||
#endif
|
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Shared::Global::setTheme(const QString& path) {
|
void Shared::Global::setTheme(const QString& path) {
|
||||||
#ifdef WITH_KCONFIG
|
|
||||||
if (supported("colorSchemeTools")) {
|
if (supported("colorSchemeTools")) {
|
||||||
if (path.toLower() == "system") {
|
if (path.toLower() == "system") {
|
||||||
QApplication::setPalette(getInstance()->defaultSystemPalette);
|
QApplication::setPalette(getInstance()->defaultSystemPalette);
|
||||||
@ -397,10 +391,6 @@ void Shared::Global::setTheme(const QString& path) {
|
|||||||
QApplication::setPalette(pallete);
|
QApplication::setPalette(pallete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
SHARED_UNUSED(path);
|
|
||||||
qDebug("setTheme() was called, but this version of squawk was compiled without KConfig support, ignoring");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shared::Global::setStyle(const QString& style) {
|
void Shared::Global::setStyle(const QString& style) {
|
||||||
|
Loading…
Reference in New Issue
Block a user