Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault when clicking on Source #254

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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