forked from blue/squawk
qt6 build
This commit is contained in:
parent
a04693e39d
commit
d4cec645b5
35 changed files with 279 additions and 632 deletions
|
@ -39,7 +39,4 @@ set(HEADER_FILES
|
|||
defines.h
|
||||
)
|
||||
|
||||
target_sources(squawk PRIVATE
|
||||
${SOURCE_FILES}
|
||||
${HEADER_FILES}
|
||||
)
|
||||
target_sources(squawk PRIVATE ${SOURCE_FILES} ${HEADER_FILES})
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SHARED_CLIENTID_H
|
||||
#define SHARED_CLIENTID_H
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QDataStream>
|
||||
#include <QMetaType>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
@ -54,5 +54,3 @@ Q_DECLARE_METATYPE(Shared::ClientId)
|
|||
|
||||
QDataStream& operator << (QDataStream& stream, const Shared::ClientId& info);
|
||||
QDataStream& operator >> (QDataStream& stream, Shared::ClientId& info);
|
||||
|
||||
#endif // SHARED_CLIENTID_H
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SHARED_CLIENTINFO_H
|
||||
#define SHARED_CLIENTINFO_H
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QString>
|
||||
|
@ -54,5 +54,3 @@ private:
|
|||
|
||||
QDataStream& operator << (QDataStream& stream, const Shared::ClientInfo& info);
|
||||
QDataStream& operator >> (QDataStream& stream, Shared::ClientInfo& info);
|
||||
|
||||
#endif // SHARED_CLIENTINFO_H
|
||||
|
|
|
@ -101,8 +101,8 @@ enum class Avatar {
|
|||
valid
|
||||
};
|
||||
Q_ENUM_NS(Avatar)
|
||||
static const Avatar AvatarHighest = Avatar::valid;
|
||||
static const Avatar AvatarLowest = Avatar::empty;
|
||||
static const Avatar AvatarHighest = Avatar::valid;
|
||||
static const Avatar AvatarLowest = Avatar::empty;
|
||||
|
||||
|
||||
static const std::deque<QString> messageStateThemeIcons = {"state-offline", "state-sync", "state-ok", "state-error"};
|
||||
|
|
|
@ -23,12 +23,6 @@
|
|||
#include "enums.h"
|
||||
#include "ui/models/roster.h"
|
||||
|
||||
#ifdef WITH_SIMPLE_CRYPT
|
||||
#define SIMPLE_CRYPT_ENABLED true
|
||||
#else
|
||||
#define SIMPLE_CRYPT_ENABLED false
|
||||
#endif
|
||||
|
||||
#ifdef WITH_OMEMO
|
||||
constexpr bool OMEMO_SUPPORT = true;
|
||||
#else
|
||||
|
@ -158,8 +152,7 @@ Shared::Global::Global():
|
|||
optionalFeatures({
|
||||
{"KWallet", false},
|
||||
{"openFileManagerWindowJob", false},
|
||||
{"colorSchemeTools", false},
|
||||
{"simpleCryptJammedPassword", SIMPLE_CRYPT_ENABLED}
|
||||
{"colorSchemeTools", false}
|
||||
}),
|
||||
fileCache()
|
||||
{
|
||||
|
@ -324,7 +317,7 @@ void Shared::Global::highlightInFileManager(const QString& path)
|
|||
qDebug() << "requested to highlight in file manager url" << path << "but it's not supported: squawk wasn't compiled to support it, trying fallback";
|
||||
#endif
|
||||
|
||||
QFileInfo info = path;
|
||||
QFileInfo info(path);
|
||||
if (info.exists()) {
|
||||
QProcess proc;
|
||||
proc.start("xdg-mime", query);
|
||||
|
|
|
@ -43,3 +43,19 @@ Shared::MessageInfo & Shared::MessageInfo::operator=(const Shared::MessageInfo&
|
|||
|
||||
return *this;
|
||||
}
|
||||
|
||||
QDataStream& operator >> (QDataStream& in, Shared::MessageInfo& info) {
|
||||
in >> info.account;
|
||||
in >> info.jid;
|
||||
in >> info.messageId;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
QDataStream& operator <<( QDataStream& out, const Shared::MessageInfo& info) {
|
||||
out << info.account;
|
||||
out << info.jid;
|
||||
out << info.messageId;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QDataStream>
|
||||
|
||||
namespace Shared {
|
||||
struct MessageInfo {
|
||||
|
@ -34,3 +35,6 @@ struct MessageInfo {
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
QDataStream& operator << (QDataStream& out, const Shared::MessageInfo& info);
|
||||
QDataStream& operator >> (QDataStream& in, Shared::MessageInfo& info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue