Skip to content

Commit

Permalink
Refactoring 0.0.40
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Oct 30, 2024
1 parent 042b8a6 commit c9c4e20
Show file tree
Hide file tree
Showing 19 changed files with 988 additions and 168 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ jobs:
}
}
# Install Qt with simplified arguments
# Install Qt
Write-Host "Installing Qt..."
Start-Process -FilePath $qtInstallerPath -ArgumentList `
'--accept-messages', '--confirm-command', '--platform minimal' `
-NoNewWindow -Wait
'--accept-messages', '--confirm-command', '--no-interaction', `
'--platform minimal', '--select-components qt.qt6.653.win64_msvc2019_64', `
'--install-root C:\Qt' -NoNewWindow -Wait
# Verify installation path exists
if (!(Test-Path "C:\Qt")) {
# Verify installation
if (!(Test-Path "C:\Qt\6.5.3\msvc2019_64")) {
throw "Qt installation failed!"
}
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Change Log

## 0.0.40

- Implemented:
- Delete
- Select All
- Begin/End Select
- Copy to Clipboard -> Copy Full Path to Clipboard
- Copy to Clipboard -> Copy File Name to Clipboard
- Copy to Clipboard -> Copy Directory to Clipboard
- Convert Case to -> UPPERCASE
- Convert Case to -> lowercase
- Line Operations -> Duplicate Current Line
- Line Operations -> Delete Current Line
- Line Operations -> Move Line Up
- Line Operations -> Move Line Down
- End of Line -> Windows Format
- End of Line -> Unix / OS X Format
- End of Line -> Old Mac Format
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ set(PROJECT_SOURCES
src/mainwindow/formatting.h
src/mainwindow/session.cpp
src/mainwindow/session.h
src/mainwindow/textoperations.cpp
src/mainwindow/textoperations.h
)

# Add Qt6 executable
Expand Down
18 changes: 9 additions & 9 deletions CMakeLists.txt.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 14.0.2, 2024-10-28T06:02:02. -->
<!-- Written by QtCreator 14.0.2, 2024-10-30T06:37:11. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -102,14 +102,14 @@
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_GENERATOR:STRING=Ninja</value>
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
<value type="QString" key="CMake.Source.Directory">/data/Code/Qt/Notepad--</value>
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Code/Qt/Notepad--/build/Desktop-Debug</value>
Expand Down Expand Up @@ -160,14 +160,14 @@
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_GENERATOR:STRING=Ninja</value>
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}</value>
<value type="QString" key="CMake.Source.Directory">/data/Code/Qt/Notepad--</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Code/Qt/Notepad--/build/Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
Expand Down
9 changes: 5 additions & 4 deletions src/document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Document::Document(const QString &filePath, QWidget *parent)
qDebug() << "Document created for file: " << filePath;
// Initialize the code editor and layout
m_editor = new CodeEditor(this);

QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(m_editor);
setLayout(layout);
Expand Down Expand Up @@ -109,6 +110,10 @@ Document::~Document() {
qDebug() << "Document destructor called, all resources cleaned up.";
}

QString Document::filePath() const {
return m_filePath;
}

void Document::onLoadingStarted() {
qDebug() << "Loading started for document:" << m_filePath;

Expand Down Expand Up @@ -202,10 +207,6 @@ void Document::setFilePath(const QString &path) {
qDebug() << "File path set to:" << m_filePath;
}

QString Document::filePath() const {
return m_filePath;
}

QString Document::fileName() const {
return m_fileName;
}
Expand Down
Loading

0 comments on commit c9c4e20

Please sign in to comment.