From: Hannah von Reth Date: Wed, 22 Apr 2020 10:08:30 +0000 (+0200) Subject: Use Q_ENUM_NS for PinState X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~115 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c80329282966fb0d2c417839d3aac88356477aa9;p=nextcloud-desktop.git Use Q_ENUM_NS for PinState --- diff --git a/src/common/common.cmake b/src/common/common.cmake index aaaed36af..5c7cd52c9 100644 --- a/src/common/common.cmake +++ b/src/common/common.cmake @@ -10,6 +10,7 @@ set(common_SOURCES ${CMAKE_CURRENT_LIST_DIR}/utility.cpp ${CMAKE_CURRENT_LIST_DIR}/remotepermissions.cpp ${CMAKE_CURRENT_LIST_DIR}/vfs.cpp + ${CMAKE_CURRENT_LIST_DIR}/pinstate.cpp ${CMAKE_CURRENT_LIST_DIR}/plugin.cpp ${CMAKE_CURRENT_LIST_DIR}/syncfilestatus.cpp ) diff --git a/src/common/pinstate.cpp b/src/common/pinstate.cpp new file mode 100644 index 000000000..bb3e4e165 --- /dev/null +++ b/src/common/pinstate.cpp @@ -0,0 +1,16 @@ +/* + * Copyright (C) by Hannah von Reth + * + * 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 2 of the License, or + * (at your option) 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. + */ + +#include "pinstate.h" +#include "moc_pinstate.cpp" diff --git a/src/common/pinstate.h b/src/common/pinstate.h index c86d11ae5..a50ed7eab 100644 --- a/src/common/pinstate.h +++ b/src/common/pinstate.h @@ -17,8 +17,13 @@ #include "ocsynclib.h" +#include + namespace OCC { +namespace PinStateEnums { +OCSYNC_EXPORT Q_NAMESPACE + /** Determines whether items should be available locally permanently or not * * The idea is that files and folders can be marked with the user intent @@ -72,6 +77,7 @@ enum class PinState { */ Unspecified = 3, }; +Q_ENUM_NS(PinState); /** A user-facing version of PinState. * @@ -119,6 +125,9 @@ enum class VfsItemAvailability { */ OnlineOnly = 4, }; +Q_ENUM_NS(VfsItemAvailability) +} +using namespace PinStateEnums; }