mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
build fix for the case when QT_NO_UNDOGROUP is defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
739beac409
commit
dacb1728d6
3 changed files with 17 additions and 6 deletions
|
@ -379,9 +379,11 @@ void FormWindow::setCursorToAll(const QCursor &c, QWidget *start)
|
|||
|
||||
void FormWindow::init()
|
||||
{
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
if (FormWindowManager *manager = qobject_cast<FormWindowManager*> (core()->formWindowManager())) {
|
||||
manager->undoGroup()->addStack(m_undoStack.qundoStack());
|
||||
}
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
|
||||
m_blockSelectionChanged = false;
|
||||
|
||||
|
|
|
@ -483,6 +483,7 @@ void FormWindowManager::setupActions()
|
|||
connect(m_actionDefaultPreview, SIGNAL(triggered()),
|
||||
this, SLOT(slotActionDefaultPreviewActivated()));
|
||||
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
m_undoGroup = new QUndoGroup(this);
|
||||
|
||||
m_actionUndo = m_undoGroup->createUndoAction(this);
|
||||
|
@ -492,6 +493,7 @@ void FormWindowManager::setupActions()
|
|||
m_actionRedo = m_undoGroup->createRedoAction(this);
|
||||
m_actionRedo->setEnabled(false);
|
||||
m_actionRedo->setIcon(QIcon::fromTheme(QLatin1String("edit-redo"), createIconSet(QLatin1String("redo.png"))));
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
|
||||
m_actionShowFormWindowSettingsDialog = new QAction(tr("Form &Settings..."), this);
|
||||
m_actionShowFormWindowSettingsDialog->setObjectName(QLatin1String("__qt_form_settings_action"));
|
||||
|
@ -930,6 +932,7 @@ QPixmap FormWindowManager::createPreviewPixmap(QString *errorMessage)
|
|||
return pixmap;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
QAction *FormWindowManager::actionUndo() const
|
||||
{
|
||||
return m_actionUndo;
|
||||
|
@ -939,6 +942,7 @@ QAction *FormWindowManager::actionRedo() const
|
|||
{
|
||||
return m_actionRedo;
|
||||
}
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
|
||||
QActionGroup *FormWindowManager::actionGroupPreviewInStyle() const
|
||||
{
|
||||
|
@ -965,10 +969,12 @@ void FormWindowManager::dragItems(const QList<QDesignerDnDItemInterface*> &item_
|
|||
QDesignerMimeData::execDrag(item_list, m_core->topLevel());
|
||||
}
|
||||
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
QUndoGroup *FormWindowManager::undoGroup() const
|
||||
{
|
||||
return m_undoGroup;
|
||||
}
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
|
||||
QAction *FormWindowManager::actionShowFormWindowSettingsDialog() const
|
||||
{
|
||||
|
|
|
@ -61,8 +61,10 @@ public:
|
|||
inline QAction *actionSelectAll() const { return m_actionSelectAll; }
|
||||
inline QAction *actionLower() const { return m_actionLower; }
|
||||
inline QAction *actionRaise() const { return m_actionRaise; }
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
QAction *actionUndo() const;
|
||||
QAction *actionRedo() const;
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
|
||||
inline QAction *actionHorizontalLayout() const { return m_actionHorizontalLayout; }
|
||||
inline QAction *actionVerticalLayout() const { return m_actionVerticalLayout; }
|
||||
|
@ -89,7 +91,9 @@ public:
|
|||
|
||||
void dragItems(const QList<QDesignerDnDItemInterface*> &item_list);
|
||||
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
QUndoGroup *undoGroup() const;
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
|
||||
virtual PreviewManager *previewManager() const { return m_previewManager; }
|
||||
|
||||
|
@ -123,8 +127,6 @@ private:
|
|||
FormWindow *findFormWindow(QWidget *w);
|
||||
QWidget *findManagedWidget(FormWindow *fw, QWidget *w);
|
||||
|
||||
void setCurrentUndoStack(QUndoStack *stack);
|
||||
|
||||
private:
|
||||
enum CreateLayoutContext { LayoutContainer, LayoutSelection, MorphLayout };
|
||||
|
||||
|
@ -160,16 +162,17 @@ private:
|
|||
mutable PreviewActionGroup *m_actionGroupPreviewInStyle;
|
||||
QAction *m_actionShowFormWindowSettingsDialog;
|
||||
|
||||
QAction *m_actionUndo;
|
||||
QAction *m_actionRedo;
|
||||
|
||||
QMap<QWidget *,bool> getUnsortedLayoutsToBeBroken(bool firstOnly) const;
|
||||
bool hasLayoutsToBeBroken() const;
|
||||
QWidgetList layoutsToBeBroken(QWidget *w) const;
|
||||
QWidgetList layoutsToBeBroken() const;
|
||||
|
||||
QUndoGroup *m_undoGroup;
|
||||
#ifndef QT_NO_UNDOGROUP
|
||||
QAction *m_actionUndo;
|
||||
QAction *m_actionRedo;
|
||||
|
||||
QUndoGroup *m_undoGroup;
|
||||
#endif // QT_NO_UNDOGROUP
|
||||
};
|
||||
|
||||
} // namespace qdesigner_internal
|
||||
|
|
Loading…
Add table
Reference in a new issue