Commit 75577674 authored by LordTermor's avatar LordTermor

Fixed AUR

parent 57fa9f82
......@@ -196,7 +196,7 @@ LoaderDelegate{
}
Label{
clip: true
text:repo
text:JSUtils.isAccessible(repo)?repo:"AUR"
}
}
}
......@@ -205,7 +205,7 @@ LoaderDelegate{
Item{}
}
property var repo: Component{
Item{}
Item{}
}
property var size: Component{
Item{}
......@@ -255,9 +255,9 @@ Item{}
property var buildButton: Component{
Item {
Button{
width: parent.width
checkable: true
anchors.fill: parent
anchors.verticalCenter: parent.verticalCenter
anchors.margins: 5
text: installedVersion!=""?"Remove":"Build"
checked: isPending()
......
......@@ -20,7 +20,7 @@ Table{
id: modelLoader
sourceComponent: (JSUtils.isAccessible(packageList)
&& list.packageList.every((item)=>
JSUtils.qmlTypeOf(item,"AlpmPackage")))?
JSUtils.qmlTypeOf(item,"LibQPamac::AlpmPackage")))?
repoPackageModelComponent:aurPackageModelComponent
}
Component{
......
......@@ -17,7 +17,7 @@ Pane{
if(currentIndex==Database.Repos){
pendingPackageList.packageList = Database.findPackagesByName(toInstall.concat(toRemove));
} else{
pendingPackageList.packageListFuture = Database.getAurPackages(toBuild);
pendingPackageList.packageList = Database.getAurPackages(toBuild);
}
}
}
......
......@@ -78,7 +78,7 @@ Pane{
onTextChanged: {
if(tempModel===undefined){
drawer.push("SideMenuSearch.qml")
drawer.push("SideMenu/SideMenuSearch.qml")
tempModel = mainView.packageList;
}
if(text.length!=0){
......
......@@ -5,6 +5,7 @@ import QPamac.Database 1.0
import QPamac.Async 1.0
import QtQuick.Layouts 1.3
import "../../js/JSUtils.js" as Utils
import "../Components/SideMenu" as SideMenu
Page {
FutureWatcher{
......@@ -25,13 +26,13 @@ Page {
}
}
SideBar {
SideMenu.Drawer {
background: Rectangle {
color: systemPalette.alternateBase
}
id: drawer
initialItem: SideMenuAURPackageInfo {
initialItem: SideMenu.SideMenuAURPackageInfo {
}
}
title: pkg.name
......
......@@ -2,9 +2,9 @@
#include <pamac.h>
#include <Package.h>
#include <Utils.h>
//namespace LibQPamac {
namespace LibQPamac {
class AlpmPackage : public LibQPamac::Package
class AlpmPackage : public Package
{
Q_GADGET
public:
......@@ -47,9 +47,9 @@ AlpmPackage() = default;
PAMAC_QT_STRINGLIST_PROPERTY_GET(licenses,pamac_alpm_package_get_licenses(m_handle))
private:
protected:
PamacAlpmPackage* m_handle;
};
//} // namespace LibQPamac
Q_DECLARE_METATYPE(AlpmPackage)
} // namespace LibQPamac
Q_DECLARE_METATYPE(LibQPamac::AlpmPackage)
......@@ -2,15 +2,18 @@
#include "pamac.h"
#include "Utils.h"
#include <memory>
#include <Package.h>
#include <AlpmPackage.h>
namespace LibQPamac {
class AurPackage : public Package
class AurPackage : public AlpmPackage
{
Q_GADGET
public:
AurPackage(PamacAURPackage* package){m_handle = package;}
AurPackage(void* packageData){
m_handle = reinterpret_cast<PamacAURPackage*>(packageData);
AurPackage(PamacAURPackage* package):
m_handle(package),
AlpmPackage(&package->parent_instance){}
AurPackage(void* packageData):
m_handle(reinterpret_cast<PamacAURPackage*>(packageData)),
AlpmPackage(&reinterpret_cast<PamacAURPackage*>(packageData)->parent_instance){
}
AurPackage() = default;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment