mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:42:51 +08:00
revert ubuntu Qt version
This commit is contained in:
parent
66302eff6d
commit
0c722dbea6
26
.github/workflows/build-qv2ray-cmake.yml
vendored
26
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -63,9 +63,9 @@ jobs:
|
||||
- platform: windows-2022
|
||||
arch: x64
|
||||
qt_version: "6.5"
|
||||
- platform: ubuntu-22.04
|
||||
- platform: ubuntu-20.04
|
||||
arch: x64
|
||||
qt_version: "6.5"
|
||||
qt_version: "5.12"
|
||||
- platform: macos-13
|
||||
arch: amd64
|
||||
qt_version: "6.5"
|
||||
@ -130,6 +130,15 @@ jobs:
|
||||
shell: bash
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
run: ./libs/build_deps_all.sh
|
||||
- name: Build Dependencies (Docker)
|
||||
shell: bash
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true' && matrix.platform == 'ubuntu-20.04'
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v $PWD:/nekoray \
|
||||
-w /nekoray \
|
||||
ghcr.io/matsuridayo/debian10-qt5:20230131 \
|
||||
bash -c "./libs/build_deps_all.sh"
|
||||
# ========================================================================================================= Generate MakeFile and Build
|
||||
- name: Windows - Generate MakeFile and Build
|
||||
shell: bash
|
||||
@ -148,14 +157,13 @@ jobs:
|
||||
./libs/deploy_windows64.sh
|
||||
- name: Linux - Generate MakeFile and Build
|
||||
shell: bash
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
run: |
|
||||
mkdir build
|
||||
pushd build
|
||||
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release ..
|
||||
ninja
|
||||
popd
|
||||
./libs/deploy_linux64.sh
|
||||
docker run --rm \
|
||||
-v $PWD:/nekoray \
|
||||
-w /nekoray \
|
||||
ghcr.io/matsuridayo/debian10-qt5:20230131 \
|
||||
bash -c "mkdir build && pushd build && cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. && ninja && popd &&./libs/deploy_linux64.sh"
|
||||
- name: macOS - Generate MakeFile and Build
|
||||
shell: bash
|
||||
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
|
||||
|
||||
@ -17,16 +17,16 @@ endif ()
|
||||
|
||||
# Find Qt
|
||||
if (NOT QT_VERSION_MAJOR)
|
||||
set(QT_VERSION_MAJOR 6)
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
endif ()
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network Svg LinguistTools)
|
||||
|
||||
if (NKR_CROSS)
|
||||
set_property(TARGET Qt6::moc PROPERTY IMPORTED_LOCATION /usr/bin/moc)
|
||||
set_property(TARGET Qt6::uic PROPERTY IMPORTED_LOCATION /usr/bin/uic)
|
||||
set_property(TARGET Qt6::rcc PROPERTY IMPORTED_LOCATION /usr/bin/rcc)
|
||||
set_property(TARGET Qt6::lrelease PROPERTY IMPORTED_LOCATION /usr/bin/lrelease)
|
||||
set_property(TARGET Qt6::lupdate PROPERTY IMPORTED_LOCATION /usr/bin/lupdate)
|
||||
set_property(TARGET Qt5::moc PROPERTY IMPORTED_LOCATION /usr/bin/moc)
|
||||
set_property(TARGET Qt5::uic PROPERTY IMPORTED_LOCATION /usr/bin/uic)
|
||||
set_property(TARGET Qt5::rcc PROPERTY IMPORTED_LOCATION /usr/bin/rcc)
|
||||
set_property(TARGET Qt5::lrelease PROPERTY IMPORTED_LOCATION /usr/bin/lrelease)
|
||||
set_property(TARGET Qt5::lupdate PROPERTY IMPORTED_LOCATION /usr/bin/lupdate)
|
||||
endif ()
|
||||
|
||||
#### Platform Variables ####
|
||||
|
||||
@ -95,14 +95,12 @@ DialogManageRoutes::DialogManageRoutes(QWidget *parent) : QDialog(parent), ui(ne
|
||||
ui->dns_final_out->setCurrentText(NekoGui::dataStore->routing->dns_final_out);
|
||||
reloadProfileItems();
|
||||
|
||||
connect(ui->route_prof, &QComboBox::currentIndexChanged, this, [=](const int& idx) {
|
||||
currentRouteProfileID = chainList[idx]->id;
|
||||
});
|
||||
|
||||
connect(ui->route_profiles, &QListWidget::itemDoubleClicked, this, [=](const QListWidgetItem* item){
|
||||
on_edit_route_clicked();
|
||||
});
|
||||
|
||||
connect(ui->route_prof, SIGNAL(currentIndexChanged(int)), this, SLOT(updateCurrentRouteProfile(int)));
|
||||
|
||||
deleteShortcut = new QShortcut(QKeySequence(Qt::Key_Delete), this);
|
||||
|
||||
connect(deleteShortcut, &QShortcut::activated, this, [=]{
|
||||
@ -112,6 +110,10 @@ DialogManageRoutes::DialogManageRoutes(QWidget *parent) : QDialog(parent), ui(ne
|
||||
ADD_ASTERISK(this)
|
||||
}
|
||||
|
||||
void DialogManageRoutes::updateCurrentRouteProfile(int idx) {
|
||||
currentRouteProfileID = chainList[idx]->id;
|
||||
}
|
||||
|
||||
DialogManageRoutes::~DialogManageRoutes() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@ -36,6 +36,8 @@ private:
|
||||
public slots:
|
||||
void accept() override;
|
||||
|
||||
void updateCurrentRouteProfile(int idx);
|
||||
|
||||
void on_new_route_clicked();
|
||||
|
||||
void on_edit_route_clicked();
|
||||
|
||||
@ -316,14 +316,18 @@ void RouteItem::on_new_route_item_clicked() {
|
||||
|
||||
void RouteItem::on_moveup_route_item_clicked() {
|
||||
if (currentIndex == -1 || currentIndex == 0) return;
|
||||
chain->Rules.swapItemsAt(currentIndex, currentIndex-1);
|
||||
auto curr = chain->Rules[currentIndex];
|
||||
chain->Rules[currentIndex] = chain->Rules[currentIndex-1];
|
||||
chain->Rules[currentIndex-1] = curr;
|
||||
currentIndex--;
|
||||
updateRouteItemsView();
|
||||
}
|
||||
|
||||
void RouteItem::on_movedown_route_item_clicked() {
|
||||
if (currentIndex == -1 || currentIndex == chain->Rules.size() - 1) return;
|
||||
chain->Rules.swapItemsAt(currentIndex, currentIndex+1);
|
||||
auto curr = chain->Rules[currentIndex];
|
||||
chain->Rules[currentIndex] = chain->Rules[currentIndex+1];
|
||||
chain->Rules[currentIndex+1] = curr;
|
||||
currentIndex++;
|
||||
updateRouteItemsView();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user