Commit 4240f870 authored by Camilo Higuita's avatar Camilo Higuita

push updates

parent 6b74bb8c
......@@ -100,7 +100,6 @@ int main(int argc, char *argv[])
pics = openFiles(args);
Pix pix;
Tagging tag;
QQmlApplicationEngine engine;
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, [&]()
......@@ -113,7 +112,6 @@ int main(int argc, char *argv[])
auto context = engine.rootContext();
context->setContextProperty("pix", &pix);
context->setContextProperty("tag", &tag);
#ifdef STATIC_KIRIGAMI
KirigamiPlugin::getInstance().registerTypes();
......
......@@ -25,6 +25,8 @@ DBActions::DBActions(QObject *parent) : DB(parent)
qDebug() << "Getting collectionDB info from: " << PIX::CollectionDBPath;
qDebug()<< "Starting DBActions";
this->tag = new Tagging(PIX::App, PIX::version, "org.kde.pix", PIX::comment);
}
DBActions::~DBActions()
......@@ -189,7 +191,7 @@ bool DBActions::isFav(const QString &url)
bool DBActions::addTag(const QString &tag)
{
if (this->tag.tag(tag))
if (this->tag->tag(tag))
{
emit tagAdded(tag);
return true;
......@@ -203,7 +205,7 @@ bool DBActions::picTag(const QString &tag, const QString &url)
if(!tag.isEmpty() && PIX::fileExists(url))
{
auto myTag = tag.trimmed();
return this->tag.tagUrl(url,myTag);
return this->tag->tagUrl(url,myTag);
}
return false;
......
......@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QObject>
#include "db.h"
#include "tagging.h"
#include "../utils/pic.h"
class DBActions : public DB
{
......@@ -62,7 +62,7 @@ class DBActions : public DB
Q_INVOKABLE QVariantList get(const QString &queryTxt);
private:
Tagging tag;
Tagging *tag;
signals:
void tagAdded(QString tag);
......
......@@ -152,6 +152,7 @@ const QString CachePath = QStandardPaths::writableLocation(QStandardPaths::Gener
const QString NotifyDir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
const QString App = "Pix";
const QString version = "1.0";
const QString comment = "Gallery image viewer";
const QString DBName = "collection.db";
const QStringList MoodColors = {"#F0FF01","#01FF5B","#3DAEFD","#B401FF","#E91E63"};
......
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