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