1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-19 04:41:11 +00:00

Fix session dialog not showing up after first close

This commit is contained in:
Mike Gelfand 2015-09-01 20:39:34 +00:00
parent 971cc6d2d9
commit 0f7bea1bd3
5 changed files with 42 additions and 9 deletions

View file

@ -530,7 +530,7 @@ MainWindow::openProperties ()
void
MainWindow::setLocation ()
{
QDialog * d = new RelocateDialog (mySession, myModel, getSelectedTorrents (), this);
RelocateDialog * d = new RelocateDialog (mySession, myModel, getSelectedTorrents (), this);
d->setAttribute (Qt::WA_DeleteOnClose, true);
d->show ();
}

View file

@ -16,7 +16,7 @@
***/
void
SessionDialog::onAccepted ()
SessionDialog::accept ()
{
myPrefs.set (Prefs::SESSION_IS_REMOTE, ui.remoteSessionRadio->isChecked ());
myPrefs.set (Prefs::SESSION_REMOTE_HOST, ui.hostEdit->text ());
@ -25,7 +25,7 @@ SessionDialog::onAccepted ()
myPrefs.set (Prefs::SESSION_REMOTE_USERNAME, ui.usernameEdit->text ());
myPrefs.set (Prefs::SESSION_REMOTE_PASSWORD, ui.passwordEdit->text ());
mySession.restart ();
hide ();
BaseDialog::accept ();
}
void
@ -75,7 +75,4 @@ SessionDialog::SessionDialog (Session& session, Prefs& prefs, QWidget * parent):
myAuthWidgets << ui.passwordLabel << ui.passwordEdit;
resensitize ();
connect (ui.dialogButtons, SIGNAL (rejected ()), this, SLOT (hide ()));
connect (ui.dialogButtons, SIGNAL (accepted ()), this, SLOT (onAccepted ()));
}

View file

@ -27,8 +27,11 @@ class SessionDialog: public BaseDialog
SessionDialog (Session& session, Prefs& prefs, QWidget * parent = nullptr);
virtual ~SessionDialog () {}
public slots:
// QDialog
virtual void accept ();
private slots:
void onAccepted ();
void resensitize ();
private:

View file

@ -131,5 +131,38 @@
</layout>
</widget>
<resources/>
<connections/>
<connections>
<connection>
<sender>dialogButtons</sender>
<signal>accepted()</signal>
<receiver>SessionDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>124</x>
<y>244</y>
</hint>
<hint type="destinationlabel">
<x>124</x>
<y>132</y>
</hint>
</hints>
</connection>
<connection>
<sender>dialogButtons</sender>
<signal>rejected()</signal>
<receiver>SessionDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>124</x>
<y>244</y>
</hint>
<hint type="destinationlabel">
<x>124</x>
<y>132</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View file

@ -49,7 +49,7 @@ StatsDialog::setVisible (bool visible)
myTimer->stop ();
if (visible)
myTimer->start (REFRESH_INTERVAL_MSEC);
QDialog::setVisible (visible);
BaseDialog::setVisible (visible);
}
void