diff --git a/src/designer/src/designer/designer.pro b/src/designer/src/designer/designer.pro index a4d2510..056ad0e 100644 --- a/src/designer/src/designer/designer.pro +++ b/src/designer/src/designer/designer.pro @@ -6,7 +6,7 @@ INCLUDEPATH += \ ../lib/extension \ ../lib/shared \ extra - +CONFIG+=console RESOURCES += designer.qrc contains(QT_CONFIG, static) { diff --git a/src/designer/src/designer/qdesigner_actions.cpp b/src/designer/src/designer/qdesigner_actions.cpp index 41aaa9a..4521fcf 100644 --- a/src/designer/src/designer/qdesigner_actions.cpp +++ b/src/designer/src/designer/qdesigner_actions.cpp @@ -592,6 +592,7 @@ void QDesignerActions::slotOpenForm() bool QDesignerActions::openForm(QWidget *parent) { + qDebug() << __FUNCTION__; closePreview(); const QString extension = uiExtension(); const QStringList fileNames = QFileDialog::getOpenFileNames(parent, tr("Open Form"), @@ -611,6 +612,7 @@ bool QDesignerActions::openForm(QWidget *parent) bool QDesignerActions::saveFormAs(QDesignerFormWindowInterface *fw) { + qDebug() << __FUNCTION__; const QString extension = uiExtension(); QString dir = fw->fileName(); @@ -642,6 +644,7 @@ bool QDesignerActions::saveFormAs(QDesignerFormWindowInterface *fw) void QDesignerActions::saveForm() { + qDebug() << __FUNCTION__; if (QDesignerFormWindowInterface *fw = core()->formWindowManager()->activeFormWindow()) { if (saveForm(fw)) showStatusBarMessage(savedMessage(QFileInfo(fw->fileName()).fileName())); @@ -650,6 +653,7 @@ void QDesignerActions::saveForm() void QDesignerActions::saveAllForms() { + qDebug() << __FUNCTION__; QString fileNames; QDesignerFormWindowManagerInterface *formWindowManager = core()->formWindowManager(); if (const int totalWindows = formWindowManager->formWindowCount()) { @@ -676,16 +680,18 @@ void QDesignerActions::saveAllForms() bool QDesignerActions::saveForm(QDesignerFormWindowInterface *fw) { + qDebug() << __FUNCTION__; bool ret; if (fw->fileName().isEmpty()) ret = saveFormAs(fw); else - ret = writeOutForm(fw, fw->fileName()); + ret = writeOutForm(fw, fw->fileName()); return ret; } void QDesignerActions::closeForm() { + qDebug() << __FUNCTION__; if (m_previewManager->previewCount()) { closePreview(); return; diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp index 6b03b47..08f0cfb 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp +++ b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp @@ -89,12 +89,14 @@ QDesignerAxWidget *QAxWidgetPropertySheet::axWidget() const // Reload as the meta object changes. bool QAxWidgetPropertySheet::reset(int index) { + qDebug() << __FUNCTION__ << index; const QString name = propertyName(index); QMap::iterator it = m_currentProperties.changedProperties.find(name); if (it != m_currentProperties.changedProperties.end()) m_currentProperties.changedProperties.erase(it); if (name != m_controlProperty) return QDesignerPropertySheet::reset(index); + qDebug() << __FUNCTION__ << "ctrl"; axWidget()->resetControl(); QTimer::singleShot(0, this, SLOT(updatePropertySheet())); return true; @@ -104,9 +106,11 @@ QVariant QAxWidgetPropertySheet::property(int index) const { // QTBUG-34592, accessing the 'control' property via meta object system // may cause crashes during loading for some controls. - return propertyName(index) == m_controlProperty ? + QVariant v = propertyName(index) == m_controlProperty ? QVariant(axWidget()->control()) : QDesignerPropertySheet::property(index); + qDebug() << __FUNCTION__ << index << v; + return v; } void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value) @@ -114,8 +118,9 @@ void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value) // take care of all changed properties const QString name = propertyName(index); + qDebug() << __FUNCTION__ << index << name << value; m_currentProperties.changedProperties[name] = value; - if (name != m_controlProperty) { + if (name != m_controlProperty) { QDesignerPropertySheet::setProperty(index, value); return; } @@ -124,6 +129,7 @@ void QAxWidgetPropertySheet::setProperty(int index, const QVariant &value) const QString clsid = value.canConvert() ? qvariant_cast(value).value() : value.toString(); + qDebug() << __FUNCTION__ << name << clsid; if (clsid.isEmpty() || !axWidget()->loadControl(clsid)) reset(index); else @@ -146,6 +152,7 @@ int QAxWidgetPropertySheet::indexOf(const QString &name) const void QAxWidgetPropertySheet::updatePropertySheet() { + qDebug() << __FUNCTION__ ; // refresh the property sheet (we are deleting m_currentProperties) struct SavedProperties tmp = m_currentProperties; QDesignerAxWidget *axw = axWidget();