ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvFileUtils.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 // ##########################################################################
10 // # #
11 // # CLOUDVIEWER #
12 // # #
13 // # This program is free software; you can redistribute it and/or modify #
14 // # it under the terms of the GNU General Public License as published by #
15 // # the Free Software Foundation; version 2 or later of the License. #
16 // # #
17 // # This program is distributed in the hope that it will be useful, #
18 // # but WITHOUT ANY WARRANTY; without even the implied warranty of #
19 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
20 // # GNU General Public License for more details. #
21 // # #
22 // # COPYRIGHT: CLOUDVIEWER project #
23 // # #
24 // ##########################################################################
25 
26 #include <QStandardPaths>
27 
28 namespace ecvFileUtils {
30 inline QString defaultDocPath() {
31  // note that according to the docs the QStandardPaths::DocumentsLocation
32  // path is never empty
33  return QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)
34  .first();
35 }
36 } // namespace ecvFileUtils
QString defaultDocPath()
Shortcut for getting the documents location path.
Definition: ecvFileUtils.h:30