Skip to content

Commit

Permalink
feat: Update QCodeEditor, take place of ExtendedEditorFeatures
Browse files Browse the repository at this point in the history
The submodule is changed to ouuan/QCodeEditor. See its commit messages
for more information. It took the place of ExtendedEditorFeatures.

Basically, some improvements, incluing these actions are added:

/**
 * @brief Slot, that indent the selected lines.
 */
void indent();

/**
 * @brief Slot, that unindent the selected lines.
 */
void unindent();

/**
 * @brief Slot, that swap the selected lines up.
 */
void swapLineUp();

/**
 * @brief Slot, that swap the selected lines down.
 */
void swapLineDown();

/**
 * @brief Slot, that delete the selected lines.
 */
void deleteLine();

/**
 * @brief Slot, that toggle single line comment of the
 * selected lines.
 */
void toggleComment();

/**
 * @brief Slot, that toggle block comment of the selection.
 */
void toggleBlockComment();

The responding actions are added in appwindow in this commit.

The name of some widgets are also corrected in `appwindow.ui`.
  • Loading branch information
ouuan committed Feb 5, 2020
1 parent ff33258 commit 9432cf2
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 427 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,6 +1,6 @@
[submodule "third_party/QCodeEditor"]
path = third_party/QCodeEditor
url = https://github.com/Megaxela/QCodeEditor
url = https://github.com/ouuan/QCodeEditor
[submodule "third_party/singleapplication"]
path = third_party/singleapplication
url = https://github.com/itay-grudev/SingleApplication.git
4 changes: 0 additions & 4 deletions CMakeLists.txt
Expand Up @@ -53,13 +53,9 @@ add_executable(CPEditor
include/Extensions/CompanionServer.hpp
include/Extensions/CFTools.hpp
include/Extensions/EditorTheme.hpp
include/Extensions/ExtendedEditorFeatures.hpp
src/Extensions/CompanionServer.cpp
src/Extensions/CFTools.cpp
src/Extensions/EditorTheme.cpp
src/Extensions/ExtendedEditorFeatures.cpp



include/mainwindow.hpp
include/preferencewindow.hpp
Expand Down
33 changes: 0 additions & 33 deletions include/Extensions/ExtendedEditorFeatures.hpp

This file was deleted.

17 changes: 9 additions & 8 deletions include/appwindow.hpp
Expand Up @@ -23,7 +23,6 @@
#include "Core/SettingsManager.hpp"
#include "Telemetry/UpdateNotifier.hpp"
#include "mainwindow.hpp"
#include "Extensions/ExtendedEditorFeatures.hpp"
#include "preferencewindow.hpp"

namespace Ui
Expand Down Expand Up @@ -121,15 +120,19 @@ class AppWindow : public QMainWindow

void on_actionSplit_Mode_triggered();

void on_comment_toggle();
void on_action_indent_triggered();

void on_tab_indent();
void on_action_unindent_triggered();

void on_tab_unindent();
void on_action_swap_line_up_triggered();

void on_move_up();
void on_action_swap_line_down_triggered();

void on_move_down();
void on_action_delete_line_triggered();

void on_action_toggle_comment_triggered();

void on_action_toggle_block_comment_triggered();

void on_confirmTriggered(MainWindow *widget);

Expand All @@ -146,8 +149,6 @@ class AppWindow : public QMainWindow
Telemetry::UpdateNotifier *updater = nullptr;
PreferenceWindow *preferenceWindow = nullptr;
Network::CompanionServer *server;
Core::ExtendedQCodeEditorFeatures *editorFeaturs = nullptr;
QVector<QShortcut *> editorFeaturesShortucts;

void setConnections();
void allocate();
Expand Down

2 comments on commit 9432cf2

@coder3101
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is #108 ready to be closed? I will migrate some issues from Megaxela to your QCodeEditor

@ouuan
Copy link
Member Author

@ouuan ouuan commented on 9432cf2 Feb 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is #108 ready to be closed? I will migrate some issues from Megaxela to your QCodeEditor

OK

Please sign in to comment.