Skip to content
Snippets Groups Projects
Select Git revision
  • 3e3589c842115e94e291164f038cad8f44a37efc
  • master default protected
  • debian protected
  • pristine-tar protected
  • upstream protected
  • backupninja.conf.d
  • when-override
  • maethor-master-patch-46063
  • maethor-master-patch-70558
  • expand_pruning_options
  • systemd_integration
  • borg-sftp-support
  • nap-initial
  • mariaback_full-intial
  • borg-ssh-keygen
  • borg-custom-init-options
  • stretch-backports
  • backupninja_debian/1.2.2-1
  • backupninja_upstream/1.2.2
  • backupninja-1.2.2
  • backupninja_debian/1.2.1-1
  • backupninja_upstream/1.2.1
  • backupninja-1.2.1
  • backupninja_debian/1.2.0-1
  • backupninja_upstream/1.2.0
  • backupninja-1.2.0
  • backupninja-1.2.0-rc1
  • backupninja_debian/1.1.0-1
  • backupninja_upstream/1.1.0
  • backupninja-1.1.0
  • backupninja_debian/1.0.2-1
  • backupninja_upstream/1.0.2
  • backupninja-1.0.2
  • backupninja_debian/1.0.1-2
  • backupninja_debian/1.0.1-1
  • backupninja_upstream/1.0.1
  • backupninja-1.0.1
37 results

example.mysql

Blame
  • qjsonmodel.cpp 9.81 KiB
    /*
     * The MIT License (MIT)
     *
     * Copyright (c) 2011 SCHUTZ Sacha
     * Copyright (c) 2020 Kali Kaneko
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to deal
     * in the Software without restriction, including without limitation the rights
     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     * copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice shall be included in all
     * copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     * SOFTWARE.
     */
    
    #include <mutex>
    #include <QDebug>
    #include <QFile>
    #include <QFont>
    
    #include "qjsonmodel.h"
    
    
    std::mutex mtx;
    
    QJsonTreeItem::QJsonTreeItem(QJsonTreeItem *parent)
    {
        mParent = parent;
    }
    
    QJsonTreeItem::~QJsonTreeItem()
    {
        qDeleteAll(mChilds);
    }
    
    void QJsonTreeItem::appendChild(QJsonTreeItem *item)
    {
        mChilds.append(item);
    }
    
    QJsonTreeItem *QJsonTreeItem::child(int row)
    {
        return mChilds.value(row);
    }
    
    QJsonTreeItem *QJsonTreeItem::parent()
    {
        return mParent;
    }
    
    int QJsonTreeItem::childCount() const
    {
        return mChilds.count();
    }
    
    int QJsonTreeItem::row() const
    {
        if (mParent)
            return mParent->mChilds.indexOf(const_cast<QJsonTreeItem*>(this));