1
0
forked from blue/squawk

Compare commits

...

2 Commits

Author SHA1 Message Date
a04693e39d
fix: build without KConfig is possible once more 2024-11-19 18:45:11 +02:00
3cce057545
fix: omitting from attribute not to wreck the stream
fix: build without kwallet
2024-11-18 22:43:46 +02:00
5 changed files with 20 additions and 12 deletions

View File

@ -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 msg(acc->getFullJid(), data.getTo(), data.getBody(), data.getThread());
QXmppMessage msg(QString(), data.getTo(), data.getBody(), data.getThread());
QString id(data.getId());
if (originalId.size() > 0)

View File

@ -33,10 +33,10 @@ Core::Squawk::Squawk(QObject* parent):
state(Shared::Availability::offline),
network(),
isInitialized(false),
clientCache(),
#ifdef WITH_KWALLET
kwallet()
kwallet(),
#endif
clientCache()
{
connect(&network, &NetworkAccess::loadFileProgress, this, &Squawk::fileProgress);
connect(&network, &NetworkAccess::loadFileError, this, &Squawk::fileError);

View File

@ -137,11 +137,12 @@ private:
Shared::Availability state;
NetworkAccess network;
bool isInitialized;
ClientCache clientCache;
#ifdef WITH_KWALLET
PSE::KWallet kwallet;
#endif
ClientCache clientCache;
private slots:
void addAccount(

View File

@ -16,9 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SHARED_DEFINES_H
#define SHARED_DEFINES_H
#pragma once
#define SHARED_UNUSED(x) (void)(x)
#endif

View File

@ -19,6 +19,7 @@
#include "global.h"
#include <QFontDatabase>
#include "defines.h"
#include "enums.h"
#include "ui/models/roster.h"
@ -361,27 +362,32 @@ void Shared::Global::highlightInFileManager(const QString& path)
}
QIcon Shared::Global::createThemePreview(const QString& path) {
#ifdef WITH_KCONFIG
if (supported("colorSchemeTools")) {
QIcon* icon = createPreview(path);
QIcon localIcon = *icon;
deletePreview(icon);
return localIcon;
} else {
return QIcon();
}
#endif
return QIcon();
}
QString Shared::Global::getColorSchemeName(const QString& path) {
#ifdef WITH_KCONFIG
if (supported("colorSchemeTools")) {
QString res;
colorSchemeName(path, res);
return res;
} else {
return "";
}
#endif
return "";
}
void Shared::Global::setTheme(const QString& path) {
#ifdef WITH_KCONFIG
if (supported("colorSchemeTools")) {
if (path.toLower() == "system") {
QApplication::setPalette(getInstance()->defaultSystemPalette);
@ -391,6 +397,10 @@ void Shared::Global::setTheme(const QString& path) {
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) {