Skip to content

Commit

Permalink
Merge pull request #254 from freedomofpress/fix-issue-248-crasher
Browse files Browse the repository at this point in the history
segfault when clicking on Source
  • Loading branch information
redshiftzero authored Mar 15, 2019
2 parents 03d4acd + 7a22a6b commit 1597f2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions securedrop_client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from securedrop_client import __version__
from securedrop_client.logic import Client
from securedrop_client.gui.main import Window
from securedrop_client.resources import load_icon, load_css
from securedrop_client.resources import load_icon
from securedrop_client.db import make_engine
from securedrop_client.utils import safe_mkdir

Expand Down Expand Up @@ -162,7 +162,9 @@ def start_app(args, qt_args) -> None:

gui = Window(args.sdc_home)
app.setWindowIcon(load_icon(gui.icon))
app.setStyleSheet(load_css('sdclient.css'))
# Revert once https://bugreports.qt.io/browse/QTBUG-69204 is fixed
# See https://github.com/freedomofpress/securedrop-client/issues/273
# app.setStyleSheet(load_css('sdclient.css'))

engine = make_engine(args.sdc_home)
Session = sessionmaker(bind=engine)
Expand Down
8 changes: 4 additions & 4 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ def set_conversation(self, widget):
old_widget = self.view_layout.takeAt(0)

if old_widget:
old_widget.widget().setVisible(False)
old_widget.widget().hide()

self.view_layout.addWidget(widget)
widget.setVisible(True)
widget.show()


class SourceList(QListWidget):
Expand Down Expand Up @@ -407,6 +407,7 @@ def setup(self, controller):

self.error_label = QLabel('')
self.error_label.setObjectName('error_label')
self.error_label.setStyleSheet('color: red')

layout.addStretch()
layout.addWidget(self.title)
Expand Down Expand Up @@ -695,7 +696,6 @@ def __init__(self, source_db_object: Source, sdc_home: str, controller: Client,
main_layout = QVBoxLayout()
main_layout.addWidget(self.scroll)
self.setLayout(main_layout)

self.update_conversation(self.source.collection)

def clear_conversation(self):
Expand Down Expand Up @@ -771,7 +771,7 @@ def add_reply(self, message_id: str, reply: str, files=None) -> None:
class SourceConversationWrapper(QWidget):
"""
Wrapper for a source's conversation including the chat window, profile tab, and other
per-soruce resources.
per-source resources.
"""

def __init__(
Expand Down

0 comments on commit 1597f2c

Please sign in to comment.