diff options
Diffstat (limited to 'src/designer/src/components/formeditor')
5 files changed, 19 insertions, 19 deletions
diff --git a/src/designer/src/components/formeditor/formwindow.cpp b/src/designer/src/components/formeditor/formwindow.cpp index 52a0e3b13..fcb8f68ef 100644 --- a/src/designer/src/components/formeditor/formwindow.cpp +++ b/src/designer/src/components/formeditor/formwindow.cpp @@ -79,7 +79,7 @@ #include <QtWidgets/qmenu.h> #include <QtWidgets/qaction.h> #include <QtWidgets/qactiongroup.h> -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) #include <QtGui/qclipboard.h> #endif #include <QtWidgets/qundogroup.h> @@ -374,7 +374,7 @@ bool FormWindow::isChildOf(const QWidget *c, const QWidget *p) void FormWindow::setCursorToAll(const QCursor &c, QWidget *start) { -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) start->setCursor(c); const QWidgetList widgets = start->findChildren<QWidget*>(); for (QWidget *widget : widgets) { @@ -1646,7 +1646,7 @@ QString FormWindow::contents() const return QString::fromUtf8(b.buffer()); } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void FormWindow::copy() { QBuffer b; @@ -1730,7 +1730,7 @@ QWidget *FormWindow::containerForPaste() const return w; } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) // Construct DomUI from clipboard (paste) and determine number of widgets/actions. static inline DomUI *domUIFromClipboard(int *widgetCount, int *actionCount) { @@ -1813,7 +1813,7 @@ static void positionPastedWidgetsAtMousePosition(FormWindow *fw, const QPoint &c (*it)->move((*it)->pos() + offset); } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void FormWindow::paste(PasteMode pasteMode) { // Avoid QDesignerResource constructing widgets that are not used as @@ -1942,7 +1942,7 @@ void FormWindow::manageWidget(QWidget *w) m_insertedWidgets.insert(w); m_widgets.append(w); -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) setCursorToAll(Qt::ArrowCursor, w); #endif diff --git a/src/designer/src/components/formeditor/formwindow.h b/src/designer/src/components/formeditor/formwindow.h index 9cfaadb2c..9edfa5d53 100644 --- a/src/designer/src/components/formeditor/formwindow.h +++ b/src/designer/src/components/formeditor/formwindow.h @@ -199,7 +199,7 @@ public: // Initialize and return a popup menu for a managed widget QMenu *initializePopupMenu(QWidget *managedWidget) override; -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void paste(PasteMode pasteMode) override; #endif QEditorFormBuilder *createFormBuilder() override; @@ -216,7 +216,7 @@ public slots: void deleteWidgets(); void raiseWidgets(); void lowerWidgets(); -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void copy(); void cut(); void paste(); diff --git a/src/designer/src/components/formeditor/formwindowmanager.cpp b/src/designer/src/components/formeditor/formwindowmanager.cpp index 410d9cad9..914180fe6 100644 --- a/src/designer/src/components/formeditor/formwindowmanager.cpp +++ b/src/designer/src/components/formeditor/formwindowmanager.cpp @@ -66,7 +66,7 @@ #include <QtGui/qevent.h> #include <QtWidgets/qapplication.h> #include <QtWidgets/qsizegrip.h> -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) #include <QtGui/qclipboard.h> #endif #include <QtWidgets/qmdiarea.h> @@ -157,7 +157,7 @@ bool FormWindowManager::eventFilter(QObject *o, QEvent *e) case QEvent::ChildAdded: case QEvent::ChildPolished: case QEvent::ChildRemoved: -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) case QEvent::Clipboard: #endif case QEvent::ContentsRectChange: @@ -364,7 +364,7 @@ QWidget *FormWindowManager::findManagedWidget(FormWindow *fw, QWidget *w) void FormWindowManager::setupActions() { -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) const QIcon cutIcon = QIcon::fromTheme(QStringLiteral("edit-cut"), createIconSet(QStringLiteral("editcut.png"))); m_actionCut = new QAction(cutIcon, tr("Cu&t"), this); m_actionCut->setObjectName(QStringLiteral("__qt_cut_action")); @@ -530,7 +530,7 @@ void FormWindowManager::setupActions() m_actionShowFormWindowSettingsDialog->setEnabled(false); } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void FormWindowManager::slotActionCutActivated() { m_activeFormWindow->cut(); @@ -814,7 +814,7 @@ void FormWindowManager::slotUpdateActions() int selectedWidgetCount = 0; int laidoutWidgetCount = 0; int unlaidoutWidgetCount = 0; -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) bool pasteAvailable = false; #endif bool layoutAvailable = false; @@ -832,7 +832,7 @@ void FormWindowManager::slotUpdateActions() QWidgetList simplifiedSelection = m_activeFormWindow->selectedWidgets(); selectedWidgetCount = simplifiedSelection.count(); -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) pasteAvailable = qApp->clipboard()->mimeData() && qApp->clipboard()->mimeData()->hasText(); #endif @@ -902,7 +902,7 @@ void FormWindowManager::slotUpdateActions() } } while(false); -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) m_actionCut->setEnabled(selectedWidgetCount > 0); m_actionCopy->setEnabled(selectedWidgetCount > 0); m_actionPaste->setEnabled(pasteAvailable); @@ -998,7 +998,7 @@ void FormWindowManager::slotActionShowFormWindowSettingsDialog() QAction *FormWindowManager::action(Action action) const { switch (action) { -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) case QDesignerFormWindowManagerInterface::CutAction: return m_actionCut; case QDesignerFormWindowManagerInterface::CopyAction: diff --git a/src/designer/src/components/formeditor/formwindowmanager.h b/src/designer/src/components/formeditor/formwindowmanager.h index fb8d58bd9..16fa319f4 100644 --- a/src/designer/src/components/formeditor/formwindowmanager.h +++ b/src/designer/src/components/formeditor/formwindowmanager.h @@ -91,7 +91,7 @@ public slots: void deviceProfilesChanged(); private slots: -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void slotActionCutActivated(); void slotActionCopyActivated(); void slotActionPasteActivated(); @@ -132,7 +132,7 @@ private: QWidget *m_morphLayoutContainer; // edit actions -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) QAction *m_actionCut; QAction *m_actionCopy; QAction *m_actionPaste; diff --git a/src/designer/src/components/formeditor/widgetselection.cpp b/src/designer/src/components/formeditor/widgetselection.cpp index 40c0cfb6b..608428554 100644 --- a/src/designer/src/components/formeditor/widgetselection.cpp +++ b/src/designer/src/components/formeditor/widgetselection.cpp @@ -93,7 +93,7 @@ WidgetHandle::WidgetHandle(FormWindow *parent, WidgetHandle::Type t, WidgetSelec void WidgetHandle::updateCursor() { -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) if (!m_active) { setCursor(Qt::ArrowCursor); return; |