Commit acdd32c2 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Use Frameworks compiler settings; use NO_SLOT_SIGNALS_KEYWORDS

s/slots:/Q_SLOTS:
s/signals:/Q_SIGNALS:
parent 21cc5c1f
......@@ -18,6 +18,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_D
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
......@@ -57,19 +58,19 @@ if(NOT APPLE)
endif()
set(HAVE_X11 ${X11_FOUND})
# See above includes for defaults
add_definitions(
-DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_TO_ASCII
# -DQT_NO_CAST_FROM_ASCII
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
# -DQT_NO_SIGNALS_SLOTS_KEYWORDS
-DQT_USE_FAST_OPERATOR_PLUS
-DQT_USE_FAST_CONCATENATION
-Wno-deprecated-declarations
)
remove_definitions(
-DQT_NO_CAST_FROM_ASCII
)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
......
......@@ -67,13 +67,13 @@ public:
*/
MainWindow* newMainWindow();
private slots:
private Q_SLOTS:
void createWindow(Profile::Ptr profile , const QString& directory);
void detachView(Session* session);
void toggleBackgroundInstance();
public slots:
public Q_SLOTS:
void slotActivateRequested (QStringList args, const QString &workingDir);
private:
......
......@@ -85,7 +85,7 @@ public:
QList<ViewProperties*> views() const;
ViewProperties* activeView() const;
public slots:
public Q_SLOTS:
/**
*
*/
......@@ -93,7 +93,7 @@ public slots:
void setActiveView(ViewProperties* view);
signals:
Q_SIGNALS:
/**
* Emitted when the user selects a bookmark from the bookmark menu.
*
......@@ -110,7 +110,7 @@ signals:
*/
void openUrls(const QList<QUrl>& urls);
private slots:
private Q_SLOTS:
void openBookmark(const KBookmark& bm, Qt::MouseButtons, Qt::KeyboardModifiers) Q_DECL_OVERRIDE;
private:
......
......@@ -67,17 +67,17 @@ public:
ColorScheme& colorScheme() const;
bool isNewScheme() const;
signals:
Q_SIGNALS:
/** Emitted when the colors in the color scheme change. */
void colorsChanged(ColorScheme* scheme);
/** Used to send back colorscheme changes into the profile edited */
void colorSchemeSaveRequested(const ColorScheme& scheme,bool isNewScheme);
public slots:
public Q_SLOTS:
/** Sets the text displayed in the description edit field. */
void setDescription(const QString& description);
private slots:
private Q_SLOTS:
void setTransparencyPercentLabel(int percent);
void setRandomizedBackgroundColor(bool randomized);
void editColorItem(QTableWidgetItem* item);
......
......@@ -68,7 +68,7 @@ public:
/** Set setChosenSessions() */
QSet<Session*> chosenSessions() const;
private slots:
private Q_SLOTS:
void selectAll() {
setSelectionChecked(true);
}
......
......@@ -87,7 +87,7 @@ public:
void selectProfileName();
const Profile::Ptr lookupProfile() const;
public slots:
public Q_SLOTS:
// reimplemented
void accept() Q_DECL_OVERRIDE;
// reimplemented
......@@ -96,7 +96,7 @@ public slots:
protected:
bool eventFilter(QObject* watched , QEvent* event) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
// sets up the specified tab page if necessary
void preparePage(int);
......
......@@ -217,7 +217,7 @@ public:
bool programBracketedPasteMode() const;
public slots:
public Q_SLOTS:
/** Change the size of the emulation's image */
virtual void setImageSize(int lines, int columns);
......@@ -271,7 +271,7 @@ public slots:
*/
virtual void focusGained() = 0;
signals:
Q_SIGNALS:
/**
* Emitted when a buffer of data is ready to send to the
......@@ -469,7 +469,7 @@ protected:
QTextDecoder* _decoder;
const KeyboardTranslator* _keyTranslator; // the keyboard layout
protected slots:
protected Q_SLOTS:
/**
* Schedules an update of attached views.
* Repeated calls to bufferedUpdate() in close succession will result in only a single update,
......@@ -483,7 +483,7 @@ protected slots:
// used to emit the selectionChanged(QString) signal
void checkSelectedText();
private slots:
private Q_SLOTS:
// triggered by timer, causes the emulation to send an updated screen image to each
// view
void showBulk();
......
......@@ -326,7 +326,7 @@ class FilterObject : public QObject
Q_OBJECT
public:
explicit FilterObject(Filter::HotSpot* filter) : _filter(filter) {}
public slots:
public Q_SLOTS:
void activated();
private:
Filter::HotSpot* _filter;
......
......@@ -63,14 +63,14 @@ public:
*/
int lineCount() const;
signals:
Q_SIGNALS:
/** Emitted when the history mode is changed. */
void historyModeChanged(Enum::HistoryModeEnum) const;
/** Emitted when the history size is changed. */
void historySizeChanged(int) const;
private slots:
private Q_SLOTS:
void buttonClicked(QAbstractButton*) const;
private:
......
......@@ -103,7 +103,7 @@ public:
// reimplemented
void setVisible(bool visible) Q_DECL_OVERRIDE;
signals:
Q_SIGNALS:
/** Emitted when the text entered in the search box is altered */
void searchChanged(const QString& text);
/** Emitted when the user clicks the button to find the next match */
......@@ -140,10 +140,10 @@ protected:
bool eventFilter(QObject* watched , QEvent* event) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
public slots:
public Q_SLOTS:
void clearLineEdit();
private slots:
private Q_SLOTS:
void notifySearchChanged();
void updateButtonsAccordingToReverseSearchSetting();
......
......@@ -81,7 +81,7 @@ public:
// reimplemented to handle test area input
bool eventFilter(QObject* watched , QEvent* event) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void setTranslatorDescription(const QString& description);
void bindingTableItemChanged(QTableWidgetItem* item);
void removeSelectedEntry();
......
......@@ -110,7 +110,7 @@ public:
void setNavigationBehavior(int behavior);
void setShowQuickButtons(bool show);
signals:
Q_SIGNALS:
/**
* Emitted by the main window to request the creation of a
......@@ -144,7 +144,7 @@ protected:
// reimplemented from QWidget
bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void newTab();
void cloneTab();
void newWindow();
......@@ -171,7 +171,7 @@ private slots:
void updateUseTransparency();
public slots:
public Q_SLOTS:
void viewFullScreen(bool fullScreen);
private:
......
......@@ -75,7 +75,7 @@ public:
/** Reimplemented from TerminalInterface. */
QString currentWorkingDirectory() const Q_DECL_OVERRIDE;
public slots:
public Q_SLOTS:
/**
* creates and run a session using the specified profile and directory
*
......@@ -139,7 +139,7 @@ public slots:
* */
void setMonitorActivityEnabled(bool enabled);
signals:
Q_SIGNALS:
/**
* Emitted when the key sequence for a shortcut, which is also a valid terminal key sequence,
* is pressed while the terminal has focus. By responding to this signal, the
......@@ -181,7 +181,7 @@ protected:
bool openFile() Q_DECL_OVERRIDE;
bool openUrl(const QUrl& url) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void activeViewChanged(SessionController* controller);
void activeViewTitleChanged(ViewProperties* properties);
void terminalExited();
......
......@@ -33,7 +33,7 @@ public:
explicit PrintOptions(QWidget* parent = 0);
~PrintOptions() Q_DECL_OVERRIDE;
public slots:
public Q_SLOTS:
void saveSettings();
};
}
......
......@@ -71,7 +71,7 @@ public:
/** TODO: Document me */
void syncWidgetActions(QWidget* widget, bool sync);
signals:
Q_SIGNALS:
/**
* Emitted when the user selects an action from the list.
*
......@@ -83,7 +83,7 @@ signals:
*/
void actionsChanged(const QList<QAction*>& actions);
private slots:
private Q_SLOTS:
void triggered(QAction* action);
void favoriteChanged(Profile::Ptr profile, bool isFavorite);
void profileChanged(Profile::Ptr profile);
......
......@@ -212,7 +212,7 @@ public:
*/
Profile::Ptr findByShortcut(const QKeySequence& shortcut);
signals:
Q_SIGNALS:
/** Emitted when a profile is added to the manager. */
void profileAdded(Profile::Ptr ptr);
......@@ -237,13 +237,13 @@ signals:
*/
void shortcutChanged(Profile::Ptr profile , const QKeySequence& newShortcut);
public slots:
public Q_SLOTS:
/** Saves settings (favorites, shortcuts, default profile etc.) to disk. */
void saveSettings();
protected slots:
protected Q_SLOTS:
private slots:
private Q_SLOTS:
private:
// loads the mappings between shortcut key sequences and
......
......@@ -146,7 +146,7 @@ public:
*/
void sendEof();
public slots:
public Q_SLOTS:
/**
* Put the pty into UTF-8 mode on systems which support it.
*/
......@@ -160,7 +160,7 @@ public slots:
*/
void sendData(const QByteArray& data);
signals:
Q_SIGNALS:
/**
* Emitted when a new block of data is received from
* the teletype.
......@@ -173,7 +173,7 @@ signals:
protected:
void setupChildProcess() Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
// called when data is received from the terminal process
void dataReceived();
......
......@@ -46,11 +46,11 @@ public:
void focusTabTitleText();
void focusRemoteTabTitleText();
signals:
Q_SIGNALS:
void tabTitleFormatChanged(const QString&);
void remoteTabTitleFormatChanged(const QString&);
public slots:
public Q_SLOTS:
void insertTabTitleText(const QString& text);
void insertRemoteTabTitleText(const QString& text);
......
......@@ -235,7 +235,7 @@ public:
*/
QString selectedText(bool preserveLineBreaks, bool trimTrailingSpaces = false, bool html = false) const;
public slots:
public Q_SLOTS:
/**
* Notifies the window that the contents of the associated terminal screen have changed.
* This moves the window to the bottom of the screen if trackOutput() is true and causes
......@@ -243,7 +243,7 @@ public slots:
*/
void notifyOutputChanged();
signals:
Q_SIGNALS:
/**
* Emitted when the contents of the associated terminal screen (see screen()) changes.
*/
......
......@@ -361,7 +361,7 @@ public:
void reportBackgroundColor(const QColor& c);
public slots:
public Q_SLOTS:
/**
* Starts the terminal session.
......@@ -566,7 +566,7 @@ public slots:
*/
Q_SCRIPTABLE int historySize() const;
signals:
Q_SIGNALS:
/** Emitted when the terminal process starts. */
void started();
......@@ -674,7 +674,7 @@ signals:
*/
void getBackgroundColor();
private slots:
private Q_SLOTS:
void done(int, QProcess::ExitStatus);
void fireZModemDetected();
......@@ -839,7 +839,7 @@ public:
*/
int masterMode() const;
private slots:
private Q_SLOTS:
void sessionFinished();
void forwardData(const QByteArray& data);
......
......@@ -171,7 +171,7 @@ public:
return _allControllers;
}
signals:
Q_SIGNALS:
/**
* Emitted when the view associated with the controller is focused.
* This can be used by other classes to plug the controller's actions into a window's
......@@ -187,7 +187,7 @@ signals:
*/
void currentDirectoryChanged(const QString& dir);
public slots:
public Q_SLOTS:
/**
* Issues a command to the session to navigate to the specified URL.
* This may not succeed if the foreground program does not understand
......@@ -221,7 +221,7 @@ public slots:
/** Decrease font size */
void decreaseFontSize();
private slots:
private Q_SLOTS:
// menu item handlers
void openBrowser();
void copy();
......@@ -401,7 +401,7 @@ public:
*/
virtual void execute() = 0;
signals:
Q_SIGNALS:
/**
* Emitted when the task has completed.
* Depending on the task this may occur just before execute() returns, or it
......@@ -441,7 +441,7 @@ public:
*/
void execute() Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void jobDataRequested(KIO::Job* job , QByteArray& data);
void jobResult(KJob* job);
......
......@@ -65,7 +65,7 @@ public:
protected:
virtual void sessionRemoved(Session*) {}
private slots:
private Q_SLOTS:
void sessionFinished();
private:
......
......@@ -95,14 +95,14 @@ public:
int getRestoreId(Session* session);
Session* idToSession(int id);
signals:
Q_SIGNALS:
/**
* Emitted when a session's settings are updated to match
* its current profile.
*/
void sessionUpdated(Session* session);
protected slots:
protected Q_SLOTS:
/**
* Called to inform the manager that a session has finished executing.
*
......@@ -110,7 +110,7 @@ protected slots:
*/
void sessionTerminated(QObject* session);
private slots:
private Q_SLOTS:
void sessionProfileCommandReceived(const QString& text);
void profileChanged(Profile::Ptr profile);
......
......@@ -40,10 +40,10 @@ public:
void setContext(Session::TabTitleContext context);
Session::TabTitleContext context() const;
signals:
Q_SIGNALS:
void dynamicElementSelected(const QString&);
private slots:
private Q_SLOTS:
void fireElementSelected(QAction*);
private:
......
......@@ -470,7 +470,7 @@ public:
void printContent(QPainter& painter, bool friendly);
public slots:
public Q_SLOTS:
/**
* Scrolls current ScreenWindow
*
......@@ -589,7 +589,7 @@ public slots:
*/
void setCenterContents(bool enable);
signals:
Q_SIGNALS:
/**
* Emitted when the user presses a key whilst the terminal widget has focus.
......@@ -686,13 +686,13 @@ protected:
void inputMethodEvent(QInputMethodEvent* event) Q_DECL_OVERRIDE;
QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
protected slots:
protected Q_SLOTS:
void scrollBarPositionChanged(int value);
void blinkTextEvent();
void blinkCursorEvent();
private slots:
private Q_SLOTS:
void unmaskBell();
void swapFGBGColors();
......
......@@ -262,7 +262,7 @@ public:
Q_UNUSED(menu);
}
signals:
Q_SIGNALS:
/** Emitted when the container is deleted */
void destroyed(ViewContainer* container);
......@@ -337,7 +337,7 @@ protected:
*/
virtual void moveViewWidget(int fromIndex , int toIndex);
private slots:
private Q_SLOTS:
void viewDestroyed(QObject* view);
void searchBarDestroyed();
......@@ -392,7 +392,7 @@ protected:
void navigationTextModeChanged(bool mode) Q_DECL_OVERRIDE;
void moveViewWidget(int fromIndex , int toIndex) Q_DECL_OVERRIDE;
private slots:
private Q_SLOTS:
void updateTitle(ViewProperties* item);
void updateIcon(ViewProperties* item);
void updateActivity(ViewProperties* item);
......@@ -409,7 +409,7 @@ private slots:
void querySourceIndex(const QDropEvent* event, int& sourceIndex);
void onMoveViewRequest(int index, const QDropEvent* event, bool& success, TabbedViewContainer* sourceTabbedContainer);
signals:
Q_SIGNALS:
void detachTab(ViewContainer * self, QWidget * activeView);
void closeTab(ViewContainer * self, QWidget * activeView);
......
......@@ -48,7 +48,7 @@ public:
// return associated tabbed container
TabbedViewContainer* connectedTabbedViewContainer();
signals:
Q_SIGNALS:
void initiateDrag(int index);
void querySourceIndex(const QDropEvent* event, int& sourceIndex) const;
void moveViewRequest(int index, const QDropEvent* event, bool& success, TabbedViewContainer* sourceTabbedContainer);
......
......@@ -177,7 +177,7 @@ public:
/** Returns a list of sessions in this ViewManager */
QList<Session*> sessions() { return _sessionMap.values(); }
signals:
Q_SIGNALS:
/** Emitted when the last view is removed from the view manager */
void empty();
......@@ -225,7 +225,7 @@ signals:
/** Requests creation of a new view, with the selected profile. */
void newViewRequest(Profile::Ptr);
public slots:
public Q_SLOTS:
/** DBus slot that returns the number of sessions in the current view. */
Q_SCRIPTABLE int sessionCount();
......@@ -273,7 +273,7 @@ public slots:
/** DBus slot that sets ALL tabs' width to match their text */
Q_SCRIPTABLE void setTabWidthToText(bool);
private slots:
private Q_SLOTS:
// called when the "Split View Left/Right" menu item is selected
void splitLeftRight();
void splitTopBottom();
......
......@@ -110,7 +110,7 @@ public: