OTHER: Change Skin initialisation workaround
Now the Skin is only loaded once on startup, not twice. Instead of loading the Skin a second time, and let Skin emit the skinChanged signal now emitting the signal is initiated from the startup code
This commit is contained in:
parent
1854945831
commit
2a75a139b3
2 changed files with 8 additions and 8 deletions
|
|
@ -56,6 +56,9 @@ class Skin : public QObject
|
||||||
const QByteArray getPLeditValue (QByteArray c) const
|
const QByteArray getPLeditValue (QByteArray c) const
|
||||||
{ return m_pledit_txt.value(c); }
|
{ return m_pledit_txt.value(c); }
|
||||||
|
|
||||||
|
/* Workaround for programm starup */
|
||||||
|
void emitSkinChanged () { emit skinChanged(this); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void skinChanged (Skin *skin);
|
void skinChanged (Skin *skin);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,15 +47,12 @@ Application::Application (int &argc, char **argv) : QApplication (argc, argv)
|
||||||
MainWindow *mw = new MainWindow (NULL);
|
MainWindow *mw = new MainWindow (NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that everything is initialized
|
* After all windows have been initialized, send the skinChanged signal,
|
||||||
* open the skin and send the
|
* so that all windows fetch their skin information.
|
||||||
* SkinChanged signal that will cause
|
* The windows should fetch their skin information themselfes on startup
|
||||||
* all widgets to get their pixmaps
|
* This is a wokaround until all widgets have been fixed
|
||||||
* TODO: Now the Skin class loads the skin itself. This call is necessarry
|
|
||||||
* until all widgets that receive the skinChanged signal fetch their
|
|
||||||
* pixmaps themself on startup
|
|
||||||
*/
|
*/
|
||||||
Skin::getInstance()->setSkin (settings.value("skin/path").toString ());
|
Skin::getInstance()->emitSkinChanged();
|
||||||
|
|
||||||
mw->show ();
|
mw->show ();
|
||||||
// The Playlist- and EqualizerWindow has to become visible after the
|
// The Playlist- and EqualizerWindow has to become visible after the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue