ports/net-im/spectral/files/patch-src_spectralroom.cpp
Adriaan de Groot 8c48f47bcd Update net-im/spectral to latest upstream release.
After this afternoon's accidental update, fix the port and complete
the update.

- Spectral expects some unreleased and unpackaged dependencies, which
  is why the DISTFILES are a mess: it's gitlab, except this one
  dependency on github, and this other one.
- libQuotient is net-im/libQuaternion, except that spectral needs a
  newer-than-the-latest-unreleased version.
- there is a rather arbitrary and hackish patch to avoid a compile
  error -- during template expansion of visit() I sometimes got
  a compiler crash, more often an error about returning a value in
  a void function. Since the whole package is glued together with
  unreleased submodules, I spent some time trying to fix it, and
  then decided that this is non-essential functionality. Two
  events trigger the compile error, so I commented them out.

PORTREVISION bumped because there's a tiny chance that something
might have built out of the mess that there was earlier.
2020-06-15 21:14:46 +00:00

35 lines
1.4 KiB
C++

Avoid compiler error.
These two events cause template substitution errors. Since the
effect of removing them is that we don't get a nice name for
the events (user-facing), it's not essential.
--- src/spectralroom.cpp.orig 2020-06-15 18:48:37 UTC
+++ src/spectralroom.cpp
@@ -354,11 +354,13 @@ QString SpectralRoom::eventToString(const RoomEvent& e
return tr("has set room aliases on server %1 to: %2")
.arg(e.stateKey(), QLocale().createSeparatedList(e.aliases()));
},
+/*
[](const RoomCanonicalAliasEvent& e) {
return (e.alias().isEmpty())
? tr("cleared the room main alias")
: tr("set the room main alias to: %1").arg(e.alias());
},
+*/
[](const RoomNameEvent& e) {
return (e.name().isEmpty()) ? tr("cleared the room name")
: tr("set the room name to: %1")
@@ -372,9 +374,11 @@ QString SpectralRoom::eventToString(const RoomEvent& e
: e.topic());
},
[](const RoomAvatarEvent&) { return tr("changed the room avatar"); },
+/*
[](const EncryptionEvent&) {
return tr("activated End-to-End Encryption");
},
+*/
[](const RoomCreateEvent& e) {
return (e.isUpgrade() ? tr("upgraded the room to version %1")
: tr("created the room, version %1"))