Commit de333ba0 authored by Daniel Molkentin's avatar Daniel Molkentin

No need to pass non-required parameters around.

Reviewed-by: dt
parent ad93155a
......@@ -160,8 +160,8 @@ WelcomeMode::WelcomeMode() :
connect(m_d->ui.openExampleButton, SIGNAL(clicked()), SLOT(slotOpenExample()));
connect(m_d->ui.examplesComboBox, SIGNAL(currentIndexChanged(int)), SLOT(slotEnableExampleButton(int)));
connect(this, SIGNAL(updatedExamples(QString, QString, QString)),
this, SLOT(slotUpdateExamples(QString, QString, QString)));
connect(this, SIGNAL(updatedExamples(QString, QString)),
this, SLOT(slotUpdateExamples(QString, QString)));
connect(m_d->rssFetcher, SIGNAL(newsItemReady(QString, QString, QString)),
m_d->ui.newsTreeWidget, SLOT(slotAddNewsItem(QString, QString, QString)));
......@@ -310,7 +310,7 @@ void WelcomeMode::slotUrlClicked(const QString &data)
QDesktopServices::openUrl(QUrl(data));
}
void WelcomeMode::slotUpdateExamples(const QString& examplePath, const QString& demosPath, const QString& docPath)
void WelcomeMode::slotUpdateExamples(const QString& examplePath, const QString& demosPath)
{
QString demoxml = demosPath + "/qtdemo/xml/examples.xml";
if (!QFile::exists(demoxml))
......
......@@ -81,14 +81,14 @@ signals:
void openHelpPage(const QString& url);
void openContextHelpPage(const QString& url);
void manageSessions();
void updatedExamples(const QString& examplePath, const QString& demosPath, const QString& docPath);
void updatedExamples(const QString& examplePath, const QString& demosPath);
private slots:
void slotFeedback();
void slotSessionClicked(const QString &data);
void slotProjectClicked(const QString &data);
void slotUrlClicked(const QString &data);
void slotUpdateExamples(const QString& examplePath, const QString& demosPath, const QString& docPath);
void slotUpdateExamples(const QString& examplePath, const QString& demosPath);
void slotEnableExampleButton(int);
void slotOpenExample();
void slotCreateNewProject();
......
......@@ -104,8 +104,8 @@ QtVersionManager::QtVersionManager()
if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>
(Core::ICore::instance()->modeManager()->mode(Core::Constants::MODE_WELCOME))) {
connect(this, SIGNAL(updatedExamples(QString,QString,QString)),
welcomeMode, SIGNAL(updatedExamples(QString,QString, QString)));
connect(this, SIGNAL(updatedExamples(QString, QString)),
welcomeMode, SIGNAL(updatedExamples(QString, QString)));
}
updateDocumentation();
updateExamples();
......@@ -156,16 +156,14 @@ void QtVersionManager::updateExamples()
QString docPath;
QString demosPath;
QtVersion *version = 0;
// try to find a version which has both, examples and docs, starting with default Qt
// try to find a version which has both, demos and examples, starting with default Qt
foreach (version, versions) {
if (version->hasExamples())
examplesPath = version->examplesPath();
if (version->hasDemos())
demosPath = version->demosPath();
if (version->hasDocumentation())
docPath = version->documentationPath();
if (!examplesPath.isEmpty() && !demosPath.isEmpty() && !docPath.isEmpty()) {
emit updatedExamples(examplesPath, demosPath, docPath);
if (!examplesPath.isEmpty() && !demosPath.isEmpty()) {
emit updatedExamples(examplesPath, demosPath);
return;
}
}
......
......@@ -184,7 +184,7 @@ public:
signals:
void defaultQtVersionChanged();
void qtVersionsChanged();
void updatedExamples(const QString& examplesPath, const QString& demosPath, const QString& docPath);
void updatedExamples(const QString& examplesPath, const QString& demosPath);
private:
// Used by QtOptionsPage
void setNewQtVersions(QList<QtVersion *> newVersions, int newDefaultVersion);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment