Commit 18b26939 authored by hjk's avatar hjk
Browse files

qt4versionmanager: compile fix

parent 6fa6eeb7
......@@ -491,7 +491,7 @@ QtDirWidget::QtDirWidget(QWidget *parent, QList<QtVersion *> versions, int defau
void QtDirWidget::buildDebuggingHelper()
{
// Find the qt version for this button..
int index = indexForWidget(qobject_cast<QWidget *>(sender());
int index = indexForWidget(qobject_cast<QWidget *>(sender()));
if (index == -1)
return;
......@@ -499,7 +499,8 @@ void QtDirWidget::buildDebuggingHelper()
QTreeWidgetItem *item = m_ui.qtdirList->topLevelItem(index);
item->setData(2, Qt::UserRole, result);
DebuggingHelperWidget *dhw = qobject_cast<DebuggingHelperWidget *>(m_ui.qtdirList->itemWidget(item, 2));
DebuggingHelperWidget *dhw =
qobject_cast<DebuggingHelperWidget *>(m_ui.qtdirList->itemWidget(item, 2));
if (dhw) {
if (m_versions.at(index)->hasDebuggingHelper())
dhw->setState(DebuggingHelperWidget::State(DebuggingHelperWidget::Ok | DebuggingHelperWidget::ShowLog));
......@@ -508,10 +509,10 @@ void QtDirWidget::buildDebuggingHelper()
}
}
int QtDirWidget::indexFor(QWidget *debuggingHelperWidget) const
int QtDirWidget::indexForWidget(QWidget *widget) const
{
int index = -1;
for(int i=0; i < m_ui.qtdirList->topLevelItemCount(); ++i) {
for (int i = 0; i < m_ui.qtdirList->topLevelItemCount(); ++i) {
if (m_ui.qtdirList->itemWidget(m_ui.qtdirList->topLevelItem(i), 2) == widget) {
index = i;
break;
......@@ -522,12 +523,12 @@ int QtDirWidget::indexFor(QWidget *debuggingHelperWidget) const
void QtDirWidget::showDebuggingBuildLog()
{
int index = indexForWidget(qobject_cast<QWidget *>(sender());
int index = indexForWidget(qobject_cast<QWidget *>(sender()));
if (index == -1)
return;
QDialog dlg;
::Ui::ShowBuildLog ui;
Ui_ShowBuildLog ui;
ui.setupUi(&dlg);
ui.log->setPlainText(m_ui.qtdirList->topLevelItem(index)->data(2, Qt::UserRole).toString());
dlg.exec();
......
......@@ -136,10 +136,11 @@ public:
QList<QtVersion *> versions() const;
int defaultVersion() const;
void finish();
private:
void showEnvironmentPage(QTreeWidgetItem * item);
void fixQtVersionName(int index);
int indexFor(QWidget *debuggingHelperWidget) const;
int indexForWidget(QWidget *debuggingHelperWidget) const;
Ui::QtVersionManager m_ui;
QList<QtVersion *> m_versions;
int m_defaultVersion;
......
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