Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
container: docker.io/library/archlinux:latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Update packages
run: pacman -Syu --noconfirm
- name: Install build dependencies
run: pacman -S --noconfirm base-devel cmake ninja qt5-base qt5-tools dtkwidget appstream-qt5 packagekit-qt5
run: pacman -S --noconfirm base-devel cmake ninja qt6-base qt6-tools qt6-declarative dtk6widget appstream-qt packagekit-qt6
- name: CMake and Make
run: |
mkdir build
Expand All @@ -31,11 +31,11 @@ jobs:
container: docker.io/library/debian:unstable
steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Refresh repos
run: apt-get update
- name: Install build dependencies
run: DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake ninja-build pkg-config qtbase5-dev libdtkwidget-dev libdtkcore-dev libdtkgui-dev libpackagekitqt5-dev libappstreamqt5-dev libsnapd-qt-dev qttools5-dev
run: DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake ninja-build pkg-config qt6-base-dev libdtkwidget-dev libdtkcore-dev libdtkgui-dev libpackagekitqt6-dev libappstreamqt-dev libsnapd-qt-dev qt6-tools-dev
- name: CMake and Make
run: |
mkdir build
Expand All @@ -48,7 +48,7 @@ jobs:
container: docker.io/library/ubuntu:24.04
steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Refresh repos
run: apt-get update
- name: Add UbuntuDDE PPA
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.vscode
/Makefile
/build
*.qm
*.qm
.cache/
36 changes: 13 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.16)

project(dde-store)

Expand All @@ -10,21 +10,16 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

find_package(PkgConfig REQUIRED)
find_package(Qt5 REQUIRED Core Widgets Network DBus Gui LinguistTools)
find_package(Dtk REQUIRED Widget Gui)
find_package(PackageKitQt5 REQUIRED)
find_package(AppStreamQt5 1.0 REQUIRED)
find_package(Qt6 REQUIRED Core Widgets Network DBus Gui LinguistTools)
find_package(Dtk6 REQUIRED Widget Gui)
find_package(PackageKitQt6 REQUIRED)
find_package(AppStreamQt 1.0 REQUIRED)
find_package(PkgConfig REQUIRED)
include(FindPkgConfig)
include(GNUInstallDirs)

include_directories(
${PackageKitQt5_INCLUDE_DIR}
${AppStreamQt5_INCLUDE_DIRS}
)

file(GLOB TS_FILES ./translations/*.ts)
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})

file(GLOB SRC
main.cpp
Expand Down Expand Up @@ -61,19 +56,14 @@ add_executable(${PROJECT_NAME}
${QM_FILES}
)

target_include_directories(${PROJECT_NAME} PUBLIC
${PackageKitQt5_INCLUDE_DIR}
${AppStreamQt5_INCLUDE_DIRS}
)

target_link_libraries(${PROJECT_NAME}
${DtkWidget_LIBRARIES}
${DtkCore_LIBRARIES}
${DtkGui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5Network_LIBRARIES}
${PackageKitQt5_LIBRARIES}
AppStreamQt5
Dtk6::Widget
Dtk6::Core
Dtk6::Gui
Qt6::Widgets
Qt6::Network
PK::packagekitqt6
AppStreamQt
)

add_subdirectory(backend/sources)
Expand Down
13 changes: 7 additions & 6 deletions backend/sources/packagekit/packagekitsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#include "backend/settings.h"
#include "backend/ratingshelper.h"
#include <Details>
#include <AppStreamQt5/pool.h>
#include <AppStreamQt5/icon.h>
#include <AppStreamQt5/screenshot.h>
#include <AppStreamQt5/image.h>
#include <AppStreamQt5/developer.h>
#include <QRegularExpression>
#include <AppStreamQt/pool.h>
#include <AppStreamQt/icon.h>
#include <AppStreamQt/screenshot.h>
#include <AppStreamQt/image.h>
#include <AppStreamQt/developer.h>

using namespace PackageKit;
using namespace AppStream;
Expand Down Expand Up @@ -195,7 +196,7 @@ void PackageKitSource::search(QString query)
break;
Component component = metadata.value(key);
bool noMatch = false;
for (QString item : query.split(QRegExp("\\s"), Qt::SkipEmptyParts)) {
for (QString item : query.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts)) {
if (!component.name().contains(item, Qt::CaseInsensitive) && !component.description().contains(item, Qt::CaseInsensitive))
noMatch = true;
}
Expand Down
2 changes: 1 addition & 1 deletion backend/sources/packagekit/packagekitsource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "backend/sourcemanager.h"
#include <Daemon>
#include <AppStreamQt5/component.h>
#include <AppStreamQt/component.h>

class PackageKitSource : public Source
{
Expand Down
4 changes: 2 additions & 2 deletions pages/homepage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ HomePage::HomePage(MainWindow *parent)
layout->setAlignment(Qt::AlignTop);
widget->setLayout(layout);
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setMargin(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0);
setLayout(mainLayout);
mainLayout->addWidget(scroll);
Expand Down Expand Up @@ -65,7 +65,7 @@ void HomePage::addCategory(QString name, QString category, MainWindow *parent)
for (App *app : map.values()) {
items.insert(0, app);
}
for (int i = 0; i < 10; i++) {
for (int i = 0; i < qMin(10, items.size()); i++) {
list->addItem(items[i]->name, items[i]->icon, i);
apps->append(items[i]);
}
Expand Down
6 changes: 3 additions & 3 deletions pages/itempage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ItemPage::ItemPage(App *app)
this->app = app;

QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setMargin(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0);
setLayout(mainLayout);
mainLayout->addWidget(scroll);
Expand All @@ -48,15 +48,15 @@ void ItemPage::load()
spinner->hide();
layout->removeWidget(spinner);
QHBoxLayout *header = new QHBoxLayout;
header->setMargin(10);
header->setContentsMargins(10, 10, 10, 10);
header->setAlignment(Qt::AlignVCenter);

QLabel *icon = new QLabel;
icon->setPixmap(app->icon.pixmap(app->icon.actualSize(QSize(64, 64))));
header->addWidget(icon);

QVBoxLayout *nameSection = new QVBoxLayout;
nameSection->setMargin(0);
nameSection->setContentsMargins(0, 0, 0, 0);
nameSection->setAlignment(Qt::AlignTop);

DLabel *name = new DLabel(app->name);
Expand Down
2 changes: 1 addition & 1 deletion widgets/list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ List::List(QString title)
headerLayout->addWidget(titleLabel);
headerLayout->addStretch();
headerLayout->setSpacing(10);
headerLayout->setMargin(10);
headerLayout->setContentsMargins(10, 10, 10, 10);
layout->addLayout(headerLayout);

listView = new DListView;
Expand Down
2 changes: 1 addition & 1 deletion widgets/stars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ stars::stars(QString app)
{
QHBoxLayout *layout = new QHBoxLayout;
this->setLayout(layout);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setAlignment(Qt::AlignLeft);
double rating = RatingsHelper::instance()->averageRating(app);
for (int i = 0; i < int(rating); i++) {
Expand Down
Loading