From e0f10636ae87b2d88572b4e261ef38761bb686fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Javier=20Merino=20Mor=C3=A1n?= Date: Sat, 18 Dec 2021 22:46:09 +0100 Subject: [PATCH] de-slotize some functions in TerminalDisplay There were a bunch of member functions in TerminalDisplay.h that were under Q_SLOTS but weren't used as slots. Move them to a more appropriate place. --- src/terminalDisplay/TerminalDisplay.h | 76 +++++++++++++-------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/terminalDisplay/TerminalDisplay.h b/src/terminalDisplay/TerminalDisplay.h index 1c5c7b78..edc21859 100644 --- a/src/terminalDisplay/TerminalDisplay.h +++ b/src/terminalDisplay/TerminalDisplay.h @@ -354,7 +354,15 @@ public: // returns 0 - not selecting, 1 - pending selection (button pressed but no movement yet), 2 - selecting int selectionState() const; -public Q_SLOTS: + Qt::Edge droppedEdge() const + { + return _overlayEdge; + } + IncrementalSearchBar *searchBar() const; + Character getCursorCharacter(int column, int line); + + int loc(int x, int y) const; + /** * Scrolls current ScreenWindow * @@ -362,18 +370,26 @@ public Q_SLOTS: */ void scrollScreenWindow(enum ScreenWindow::RelativeScrollMode mode, int amount); + /** + * Causes the widget to display or hide a message informing the user that terminal + * output has been suspended (by using the flow control key combination Ctrl+S) + * + * @param suspended True if terminal output has been suspended and the warning message should + * be shown or false to indicate that terminal output has been resumed and that + * the warning message should disappear. + */ + void outputSuspended(bool suspended); + + // Used to show/hide the message widget + void updateReadOnlyState(bool readonly); + +public Q_SLOTS: /** * Causes the terminal display to fetch the latest character image from the associated * terminal screen ( see setScreenWindow() ) and redraw the display. */ void updateImage(); - void setAutoCopySelectedText(bool enabled); - - void setCopyTextAsHTML(bool enabled); - - void setMiddleClickPasteMode(Enum::MiddleClickPasteModeEnum mode); - /** Copies the selected text to the X11 Selection. */ void copyToX11Selection(); @@ -399,15 +415,6 @@ public Q_SLOTS: * stop key (Ctrl+S) are pressed. */ void setFlowControlWarningEnabled(bool enable); - /** - * Causes the widget to display or hide a message informing the user that terminal - * output has been suspended (by using the flow control key combination Ctrl+S) - * - * @param suspended True if terminal output has been suspended and the warning message should - * be shown or false to indicate that terminal output has been resumed and that - * the warning message should disappear. - */ - void outputSuspended(bool suspended); /** * Sets whether the program currently running in the terminal is interested @@ -434,30 +441,8 @@ public Q_SLOTS: */ void bell(const QString &message); - /** - * Sets the display's contents margins. - */ - void setMargin(int margin); - - /** - * Sets whether the contents are centered between the margins. - */ - void setCenterContents(bool enable); - - Qt::Edge droppedEdge() const - { - return _overlayEdge; - } - - // Used to show/hide the message widget - void updateReadOnlyState(bool readonly); - IncrementalSearchBar *searchBar() const; - // Used for requestPrint void printScreen(); - Character getCursorCharacter(int column, int line); - - int loc(int x, int y) const; Q_SIGNALS: void requestToggleExpansion(); @@ -636,6 +621,21 @@ private: // Boilerplate setup for MessageWidget KMessageWidget *createMessageWidget(const QString &text); + // Some setters used by applyProfile + void setAutoCopySelectedText(bool enabled); + void setCopyTextAsHTML(bool enabled); + void setMiddleClickPasteMode(Enum::MiddleClickPasteModeEnum mode); + + /** + * Sets the display's contents margins. + */ + void setMargin(int margin); + + /** + * Sets whether the contents are centered between the margins. + */ + void setCenterContents(bool enable); + // the window onto the terminal screen which this display // is currently showing. QPointer _screenWindow;