misc: add license header and comment

(#11)
This commit is contained in:
kegechen 2019-08-01 10:52:17 +08:00 committed by Gary Wang
parent e0425fe568
commit 49b63c6ed5
2 changed files with 29 additions and 5 deletions

View File

@ -1,3 +1,23 @@
/*
* Copyright (C) 2019 Deepin Technology Co., Ltd.
*
* Author: Mike Chen <kegechen@gmail.com>
*
* Maintainer: Mike Chen <chenke_cm@deepin.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DGIODRIVE_H
#define DGIODRIVE_H

View File

@ -3,8 +3,6 @@
#include <glibmm/refptr.h>
#include <giomm/drive.h>
#include <QDebug>
using namespace Gio;
class DGioDrivePrivate{
@ -39,9 +37,8 @@ QString DGioDrivePrivate::name() const
return QString::fromStdString(m_gmmDrivePtr->get_name());
}
///////////////////////////////////////////////////////////////
//// class DGioDrive
/// ///////////////////////////////////////////////////////////
// -------------------------------------------------------------
DGioDrive::DGioDrive(Gio::Drive *gmmDrivePtr, QObject *parent)
: QObject(parent)
, d_ptr(new DGioDrivePrivate(this, gmmDrivePtr))
@ -54,6 +51,13 @@ DGioDrive::~DGioDrive()
}
/*!
* \brief Gets a display name for a drive.
*
* A display name is guaranteed to be in UTF8 and can thus be displayed in the UI.
*
* Wrapper of Gio::Drive::get_name()
*/
QString DGioDrive::name() const
{
Q_D(const DGioDrive);