Disable DropArea in flatpak
The droparea doesn't support flatpak and dropping something leads to a crash BUG: 455990
This commit is contained in:
@@ -849,3 +849,12 @@ int Controller::quotientMinorVersion() const
|
|||||||
return 6;
|
return 6;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Controller::isFlatpak() const
|
||||||
|
{
|
||||||
|
#ifdef NEOCHAT_FLATPAK
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ class Controller : public QObject
|
|||||||
Q_PROPERTY(bool encryptionSupported READ encryptionSupported CONSTANT)
|
Q_PROPERTY(bool encryptionSupported READ encryptionSupported CONSTANT)
|
||||||
Q_PROPERTY(int activeConnectionIndex READ activeConnectionIndex NOTIFY activeConnectionIndexChanged)
|
Q_PROPERTY(int activeConnectionIndex READ activeConnectionIndex NOTIFY activeConnectionIndexChanged)
|
||||||
Q_PROPERTY(int quotientMinorVersion READ quotientMinorVersion CONSTANT)
|
Q_PROPERTY(int quotientMinorVersion READ quotientMinorVersion CONSTANT)
|
||||||
|
Q_PROPERTY(bool isFlatpak READ isFlatpak CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static Controller &instance();
|
static Controller &instance();
|
||||||
@@ -101,6 +102,7 @@ public:
|
|||||||
Q_INVOKABLE void setApplicationProxy();
|
Q_INVOKABLE void setApplicationProxy();
|
||||||
|
|
||||||
int quotientMinorVersion() const;
|
int quotientMinorVersion() const;
|
||||||
|
bool isFlatpak() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit Controller(QObject *parent = nullptr);
|
explicit Controller(QObject *parent = nullptr);
|
||||||
|
|||||||
@@ -389,6 +389,7 @@ Kirigami.ScrollablePage {
|
|||||||
id: dropAreaFile
|
id: dropAreaFile
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onDropped: currentRoom.chatBoxAttachmentPath = drop.urls[0];
|
onDropped: currentRoom.chatBoxAttachmentPath = drop.urls[0];
|
||||||
|
enabled: !Controller.isFlatpak
|
||||||
}
|
}
|
||||||
|
|
||||||
QQC2.Pane {
|
QQC2.Pane {
|
||||||
|
|||||||
Reference in New Issue
Block a user