mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-24 09:49:42 +01:00
* Only allow one settings dialog at a time.
This commit is contained in:
parent
025d152936
commit
b99692729c
src/tomahawk
@ -1000,10 +1000,15 @@ TomahawkWindow::onHistoryForwardAvailable( bool avail )
|
||||
void
|
||||
TomahawkWindow::showSettingsDialog()
|
||||
{
|
||||
SettingsDialog* settingsDialog = new SettingsDialog;
|
||||
connect( settingsDialog, SIGNAL( finished( bool ) ), settingsDialog, SLOT( deleteLater() ) );
|
||||
if ( m_settingsDialog )
|
||||
return;
|
||||
|
||||
settingsDialog->show();
|
||||
m_settingsDialog = new SettingsDialog;
|
||||
// This needs to be a QueuedConnection, so that deleteLater() actually works.
|
||||
connect( m_settingsDialog.data(), SIGNAL( finished( bool ) ),
|
||||
m_settingsDialog.data(), SLOT( deleteLater() ), Qt::QueuedConnection );
|
||||
|
||||
m_settingsDialog->show();
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,12 +56,12 @@ class QSearchField;
|
||||
class SourceTreeView;
|
||||
class QAction;
|
||||
|
||||
class SettingsDialog;
|
||||
class MusicScanner;
|
||||
class AudioControls;
|
||||
class TomahawkTrayIcon;
|
||||
class PlaylistModel;
|
||||
class AnimatedSplitter;
|
||||
|
||||
class AccountsToolButton;
|
||||
|
||||
namespace Ui
|
||||
@ -179,6 +179,7 @@ private:
|
||||
#endif
|
||||
|
||||
Ui::TomahawkWindow* ui;
|
||||
QPointer<SettingsDialog> m_settingsDialog;
|
||||
QSearchField* m_searchWidget;
|
||||
AudioControls* m_audioControls;
|
||||
TomahawkTrayIcon* m_trayIcon;
|
||||
|
Loading…
x
Reference in New Issue
Block a user