Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c7ecded4d | |||
| f89b9dee7b | |||
| ed8e9f4e05 | |||
| eb04500c28 | |||
| 8c4ba2b049 | |||
| f3e8a364d2 | |||
| e4ca4018ca | |||
| 57d5b83daf |
18
build_files/CMakeLists.txt.patch
Normal file
18
build_files/CMakeLists.txt.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- CMakeLists.txt 2022-04-13 11:22:25.245680300 +0300
|
||||
+++ CMakeLists_f.txt 2023-03-15 14:11:55.883681000 +0300
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
include(FeatureSummary)
|
||||
include(QtCreatorIDEBranding RESULT_VARIABLE IDE_BRANDING_FILE)
|
||||
+project(QtCreator VERSION ${IDE_VERSION})
|
||||
include(QtCreatorTranslations)
|
||||
include(QtCreatorDocumentation)
|
||||
include(QtCreatorAPI)
|
||||
@@ -17,7 +18,6 @@
|
||||
|
||||
mark_as_advanced(IDE_REVISION IDE_REVISION_STR IDE_REVISION_URL)
|
||||
|
||||
-project(QtCreator VERSION ${IDE_VERSION})
|
||||
|
||||
# Force C++ standard, do not fall back, do not use compiler extensions
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
14
build_files/clangformatbaseindenter.patch
Normal file
14
build_files/clangformatbaseindenter.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- /soft/qt-creator/src/plugins/clangformat/clangformatbaseindenter.cpp 2022-12-07 04:26:12.928000000 +0000
|
||||
+++ /soft/clangformatbaseindenter.cpp 2022-12-07 04:20:13.644000000 +0000
|
||||
@@ -61,7 +61,11 @@
|
||||
|
||||
// This is a separate pass, don't do it unless it's the full formatting.
|
||||
style.FixNamespaceComments = false;
|
||||
+#if LLVM_VERSION_MAJOR >= 16
|
||||
+ style.AlignTrailingComments.Kind = clang::format::FormatStyle::TCAS_Never;
|
||||
+#else
|
||||
style.AlignTrailingComments = false;
|
||||
+#endif
|
||||
|
||||
if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
|
||||
return;
|
||||
14
build_files/clangformatutils.patch
Normal file
14
build_files/clangformatutils.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- /soft/qt-creator/src/plugins/clangformat/clangformatutils.cpp 2022-12-07 04:26:12.928000000 +0000
|
||||
+++ /soft/clangformatutils.cpp 2022-12-07 04:20:31.924000000 +0000
|
||||
@@ -71,7 +71,11 @@
|
||||
#else
|
||||
style.AlignOperands = true;
|
||||
#endif
|
||||
+#if LLVM_VERSION_MAJOR >= 16
|
||||
+ style.AlignTrailingComments.Kind = clang::format::FormatStyle::TCAS_Always;
|
||||
+#else
|
||||
style.AlignTrailingComments = true;
|
||||
+#endif
|
||||
style.AllowAllParametersOfDeclarationOnNextLine = true;
|
||||
#if LLVM_VERSION_MAJOR >= 10
|
||||
style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
|
||||
12
build_files/qlitehtml_CMakeLists.patch
Normal file
12
build_files/qlitehtml_CMakeLists.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- /soft/qt-creator/src/libs/qlitehtml/src/CMakeLists.txt 2022-12-07 11:51:30.324000000 +0000
|
||||
+++ ./CMakeLists.txt 2022-12-07 11:50:56.132000000 +0000
|
||||
@@ -12,8 +12,7 @@
|
||||
set(QLITEHTML_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(QLITEHTML_VERSION_COMPAT ${QLITEHTML_VERSION} CACHE STRING "qlitehtml compat version number.")
|
||||
|
||||
-find_package(litehtml QUIET)
|
||||
-if(NOT TARGET litehtml AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/litehtml/CMakeLists.txt)
|
||||
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/litehtml/CMakeLists.txt)
|
||||
set(ORIG_FPIC ${CMAKE_POSITION_INDEPENDENT_CODE})
|
||||
set(ORIG_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
||||
if (WIN32)
|
||||
8
build_files/remove_elf.sh
Normal file
8
build_files/remove_elf.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
for f in $(ls ./)
|
||||
do
|
||||
if [[ $(file -b $f | grep "ELF 64-bit") ]]
|
||||
then
|
||||
rm -v $f
|
||||
fi
|
||||
done
|
||||
22
build_files/toolchain-Windows.cmake
Normal file
22
build_files/toolchain-Windows.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc-posix )
|
||||
set(CMAKE_C_COMPILER_AR /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc-ar-posix )
|
||||
set(CMAKE_C_COMPILER_RANLIB /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc-ranlib-posix )
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-g++-posix )
|
||||
set(CMAKE_CXX_COMPILER_AR /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc-ar-posix )
|
||||
set(CMAKE_CXX_COMPILER_RANLIB /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc-ranlib-posix )
|
||||
set(CMAKE_ASM_NASM_COMPILER /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-as )
|
||||
set(CMAKE_RC_COMPILER /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-windres)
|
||||
set(CMAKE_OBJDUMP /usr/bin/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-objdump)
|
||||
add_definitions(-D_WIN32_WINNT=0x600 -D_GNU_SOURCE=1 -DNOWERROR=1 -DPROCESSOR_ARCHITECTURE_ARM64=12 -DUNICODE)
|
||||
|
||||
set(CMAKE_PREFIX_PATH /soft/windows)
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32 ${CMAKE_PREFIX_PATH}/lib)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
|
||||
include_directories(${CMAKE_PREFIX_PATH}/include)
|
||||
set(OpenCL_INCLUDE_DIR ${CMAKE_PREFIX_PATH}/include)
|
||||
set(OpenCL_LIBRARY ${CMAKE_PREFIX_PATH}/lib/opencl.lib)
|
||||
@@ -1,7 +1,13 @@
|
||||
#cmake_minimum_required(VERSION 3.17)
|
||||
#project(ProjectFilesystemPlugin)
|
||||
#include($ENV{SDK_QTCREATOR_SRC}/cmake/QtCreatorAPI.cmake)
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
project(ProjectFilesystemPlugin)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
find_package(QtCreator COMPONENTS Core REQUIRED)
|
||||
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc")
|
||||
add_qtc_plugin(ProjectFilesystemPlugin
|
||||
PLUGIN_DEPENDS Core ProjectExplorer
|
||||
PLUGIN_DEPENDS
|
||||
QtCreator::Core
|
||||
QtCreator::ProjectExplorer
|
||||
SOURCES ${SRC})
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
void setFilter(const Filter & f);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
QStringList getFilters(QLineEdit * le) const;
|
||||
void setFilters(QLineEdit * le, QStringList f);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace ProjectFilesystemPlugin {
|
||||
{
|
||||
Utils::globalMacroExpander()->registerPrefix("ProjectFilesystem", "Project filesystem plugin", [](QString v) -> QString {return v;} );
|
||||
Utils::globalMacroExpander()->registerFileVariables("ProjectFilesystem", "Selected item",
|
||||
[]() -> QString { return projectfs_menu_target.absoluteFilePath();});
|
||||
[]() -> Utils::FilePath { return Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath());}, true);
|
||||
// Retrieve objects from the plugin manager's object pool
|
||||
// In the extensionsInitialized function, a plugin can be sure that all
|
||||
// plugins that depend on it are completely initialized.
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace ProjectFilesystemPlugin {
|
||||
ProjectFilesystemPluginPlugin();
|
||||
~ProjectFilesystemPluginPlugin();
|
||||
|
||||
bool initialize(const QStringList &arguments, QString *errorString);
|
||||
void extensionsInitialized();
|
||||
ShutdownFlag aboutToShutdown();
|
||||
bool initialize(const QStringList &arguments, QString *errorString) override;
|
||||
void extensionsInitialized() override;
|
||||
ShutdownFlag aboutToShutdown() override;
|
||||
|
||||
private:
|
||||
void triggerAction();
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorericons.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projecttreewidget.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
#include <projectexplorer/project.h>
|
||||
@@ -169,7 +170,7 @@ void ProjectFilesystemWidget::createTree(QTreeWidgetItem * ti, const QString & d
|
||||
}
|
||||
QTreeWidgetItem * ni = new QTreeWidgetItem();
|
||||
ni->setText(0, nit);
|
||||
ni->setIcon(0, Core::FileIconProvider::icon(i));
|
||||
ni->setIcon(0, Core::FileIconProvider::icon(Utils::FilePath::fromString(i.absoluteFilePath())));
|
||||
ni->setData(0, roleFullPath, i.absoluteFilePath());
|
||||
ni->setData(0, roleItemType, i.isDir() ? itDir : itFile);
|
||||
ni->setData(0, roleIsDir, i.isDir());
|
||||
@@ -389,7 +390,7 @@ void ProjectFilesystemWidget::on_tree_itemDoubleClicked(QTreeWidgetItem * item,
|
||||
bool dir = item->data(0, roleIsDir).toBool();
|
||||
if (dir) return;
|
||||
if (afp.isEmpty()) return;
|
||||
Core::EditorManager::openEditor(afp);
|
||||
Core::EditorManager::openEditor(Utils::FilePath::fromString(afp));
|
||||
}
|
||||
|
||||
|
||||
@@ -464,7 +465,7 @@ void ProjectFilesystemWidget::on_tree_customContextMenuRequested(const QPoint &
|
||||
|
||||
void ProjectFilesystemWidget::on_actionOpen_here_triggered() {
|
||||
if (projectfs_menu_target.path().isEmpty()) return;
|
||||
Core::EditorManager::openEditor(projectfs_menu_target.absoluteFilePath(), Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
|
||||
Core::EditorManager::openEditor(Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath()), Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
|
||||
}
|
||||
|
||||
|
||||
@@ -479,13 +480,13 @@ void ProjectFilesystemWidget::on_actionOpen_external_triggered() {
|
||||
|
||||
void ProjectFilesystemWidget::on_actionShow_external_triggered() {
|
||||
if (projectfs_menu_target.path().isEmpty()) return;
|
||||
Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), projectfs_menu_target.absoluteFilePath());
|
||||
Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), Utils::FilePath::fromString(projectfs_menu_target.absoluteFilePath()));
|
||||
}
|
||||
|
||||
|
||||
void ProjectFilesystemWidget::on_actionOpen_terminal_triggered() {
|
||||
if (projectfs_menu_target.path().isEmpty()) return;
|
||||
Core::FileUtils::openTerminal(QDir(projectfs_menu_target.absoluteFilePath()).path());
|
||||
Core::FileUtils::openTerminal(Utils::FilePath::fromString(QDir(projectfs_menu_target.absoluteFilePath()).path()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,9 @@ public:
|
||||
void setCurrentSearch(QString v) {lineFilter->setText(v);}
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * e);
|
||||
void timerEvent(QTimerEvent * e);
|
||||
void changeEvent(QEvent * e) override;
|
||||
void timerEvent(QTimerEvent * e) override;
|
||||
|
||||
void createTree(QTreeWidgetItem * ti, const QString & dir, bool proc_events = true);
|
||||
void createProjectTree(void * p);
|
||||
void projectNameChanged();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "projectfilesystemwidgetplugin.h"
|
||||
#include "projectfilesystemwidget.h"
|
||||
#include <utils/utilsicons.h>
|
||||
#include <utils/qtcsettings.h>
|
||||
#include <QToolButton>
|
||||
#include <QSettings>
|
||||
#include <QMessageBox>
|
||||
@@ -29,7 +30,7 @@ Core::NavigationView ProjectFSWidgetFactory::createWidget() {
|
||||
}
|
||||
|
||||
|
||||
void ProjectFSWidgetFactory::saveSettings(QSettings * settings, int position, QWidget * widget) {
|
||||
void ProjectFSWidgetFactory::saveSettings(Utils::QtcSettings * settings, int position, QWidget * widget) {
|
||||
//QMessageBox::information(0, "", QString::fromLatin1(widget->metaObject()->className()));
|
||||
ProjectFilesystemWidget * w = qobject_cast<ProjectFilesystemWidget * >(widget);
|
||||
if (!w) return;
|
||||
@@ -56,7 +57,7 @@ void ProjectFSWidgetFactory::restoreSettings(QSettings * settings, int position,
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void ProjectFSWidgetFactory::changeEvent(QEvent *e) {
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
@@ -67,3 +68,4 @@ void ProjectFSWidgetFactory::changeEvent(QEvent *e) {
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
|
||||
class ProjectFSWidgetFactory: public Core::INavigationWidgetFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ProjectFSWidgetFactory();
|
||||
~ProjectFSWidgetFactory() {}
|
||||
|
||||
Core::NavigationView createWidget();
|
||||
Core::NavigationView createWidget() override;
|
||||
|
||||
void saveSettings(QSettings * settings, int position, QWidget * widget);
|
||||
void restoreSettings(QSettings * settings, int position, QWidget * widget);
|
||||
void saveSettings(Utils::QtcSettings * settings, int position, QWidget * widget) override;
|
||||
void restoreSettings(QSettings * settings, int position, QWidget * widget) override;
|
||||
|
||||
void changeEvent(QEvent * e);
|
||||
//void changeEvent(QEvent * e) override;
|
||||
|
||||
QToolButton * btn_reload = nullptr, * btn_filters = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user