Skip to content

Commit

Permalink
Fix webview crash and enabled back WebViewPage for better virtual key…
Browse files Browse the repository at this point in the history
…board support
  • Loading branch information
b100dian committed Jan 4, 2021
1 parent 2e6c26e commit 2677b8e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
6 changes: 5 additions & 1 deletion harbour-sailslack.desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
# From https://harbour.jolla.com/faq
# > this will make sure that the application is launched using the right booster, and will make startup faster
# However this makes the sailfish webview crash when launched from lipstick.
# See https://forum.sailfishos.org/t/is-the-new-gecko-engine-used-in-silicawebview/2924/7?u=flypig
#X-Nemo-Application-Type=silica-qt5
Icon=harbour-sailslack
Exec=harbour-sailslack
Name=Sailslack
Expand Down
6 changes: 3 additions & 3 deletions harbour-sailslack.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# App config
TARGET = harbour-sailslack
CONFIG += link_pkgconfig
PKGCONFIG += qt5embedwidget

CONFIG += sailfishapp
SAILFISHAPP_ICONS = 86x86 108x108 128x128 256x256

Expand All @@ -13,9 +16,6 @@ PKGCONFIG += nemonotifications-qt5

CONFIG += sailfish-components-webview-qt5

CONFIG += link_pkgconfig
PKGCONFIG += qt5embedwidget

# Includes
INCLUDEPATH += ./QtWebsocket

Expand Down
4 changes: 3 additions & 1 deletion qml/pages/LoginPage.qml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import harbour.sailslack 1.0 as Slack
import Sailfish.WebView 1.0

Page {
// Using WebViewPage allows the WebView to better react to virtual keyboard.
WebViewPage {
id: page

property string processId: Math.random().toString(36).substring(7)
Expand Down
10 changes: 5 additions & 5 deletions translations/harbour-sailslack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/ChannelListView.qml" line="114"/>
<location filename="../qml/pages/ChannelListView.qml" line="112"/>
<source>Direct messages</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -227,23 +227,23 @@ Are you sure you wish to leave?</source>
<context>
<name>LoginPage</name>
<message>
<location filename="../qml/pages/LoginPage.qml" line="60"/>
<location filename="../qml/pages/LoginPage.qml" line="61"/>
<source>Click below to login with your browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="64"/>
<location filename="../qml/pages/LoginPage.qml" line="65"/>
<source>Use browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="71"/>
<location filename="../qml/pages/LoginPage.qml" line="72"/>
<source>Or use the sailfish WebView
(Warning: works only from terminal!)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="75"/>
<location filename="../qml/pages/LoginPage.qml" line="76"/>
<source>Use webview</source>
<translation type="unfinished"></translation>
</message>
Expand Down

0 comments on commit 2677b8e

Please sign in to comment.