From 49b63c6ed56bba5e5ca73b968ec41d67f5722440 Mon Sep 17 00:00:00 2001 From: kegechen Date: Thu, 1 Aug 2019 10:52:17 +0800 Subject: [PATCH] misc: add license header and comment (#11) --- gio-qt/include/dgiodrive.h | 20 ++++++++++++++++++++ gio-qt/source/dgiodrive.cpp | 14 +++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/gio-qt/include/dgiodrive.h b/gio-qt/include/dgiodrive.h index f24014c..a577787 100644 --- a/gio-qt/include/dgiodrive.h +++ b/gio-qt/include/dgiodrive.h @@ -1,3 +1,23 @@ +/* + * Copyright (C) 2019 Deepin Technology Co., Ltd. + * + * Author: Mike Chen + * + * Maintainer: Mike Chen + * + * 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 . + */ #ifndef DGIODRIVE_H #define DGIODRIVE_H diff --git a/gio-qt/source/dgiodrive.cpp b/gio-qt/source/dgiodrive.cpp index cb73fff..7d46acd 100644 --- a/gio-qt/source/dgiodrive.cpp +++ b/gio-qt/source/dgiodrive.cpp @@ -3,8 +3,6 @@ #include #include -#include - 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);