Use consistent order for visibility attribute
This commit is contained in:
parent
c12db6dbfb
commit
133dbacb5d
|
@ -34,7 +34,7 @@ QT_ANNOTATE_CLASS(qt_qnamespace, "") /*end*/
|
|||
|
||||
struct SyncthingConnectionSettings;
|
||||
|
||||
QNetworkAccessManager LIB_SYNCTHING_CONNECTOR_EXPORT &networkAccessManager();
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QNetworkAccessManager &networkAccessManager();
|
||||
|
||||
enum class SyncthingStatus { Disconnected, Reconnecting, Idle, Scanning, Paused, Synchronizing, OutOfSync, BeingDestroyed };
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
||||
|
|
|
@ -16,11 +16,11 @@ namespace Data {
|
|||
/// \remarks It needs to be kept in sync with the states defined in Syncthing's "syncthing/lib/model/folderstate.go".
|
||||
enum class SyncthingDirStatus { Unknown, Idle, WaitingToScan, Scanning, PreparingToSync, Synchronizing, OutOfSync };
|
||||
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT statusString(SyncthingDirStatus status);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString statusString(SyncthingDirStatus status);
|
||||
|
||||
enum class SyncthingDirType { Unknown, SendReceive, SendOnly, ReceiveOnly };
|
||||
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT dirTypeString(SyncthingDirType dirType);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString dirTypeString(SyncthingDirType dirType);
|
||||
|
||||
struct LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingItemError {
|
||||
SyncthingItemError(const QString &message = QString(), const QString &path = QString())
|
||||
|
|
|
@ -27,16 +27,16 @@ struct SyncthingStatistics;
|
|||
struct SyncthingDir;
|
||||
struct SyncthingDev;
|
||||
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT agoString(CppUtilities::DateTime dateTime);
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT trafficString(std::uint64_t total, double rate);
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT directoryStatusString(const Data::SyncthingStatistics &stats);
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT syncCompleteString(
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString agoString(CppUtilities::DateTime dateTime);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString trafficString(std::uint64_t total, double rate);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString directoryStatusString(const Data::SyncthingStatistics &stats);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString syncCompleteString(
|
||||
const std::vector<const SyncthingDir *> &completedDirs, const SyncthingDev *remoteDevice = nullptr);
|
||||
QString LIB_SYNCTHING_CONNECTOR_EXPORT rescanIntervalString(int rescanInterval, bool fileSystemWatcherEnabled);
|
||||
bool LIB_SYNCTHING_CONNECTOR_EXPORT isLocal(const QString &hostName);
|
||||
bool LIB_SYNCTHING_CONNECTOR_EXPORT isLocal(const QString &hostName, const QHostAddress &hostAddress);
|
||||
bool LIB_SYNCTHING_CONNECTOR_EXPORT setDirectoriesPaused(QJsonObject &syncthingConfig, const QStringList &dirIds, bool paused);
|
||||
bool LIB_SYNCTHING_CONNECTOR_EXPORT setDevicesPaused(QJsonObject &syncthingConfig, const QStringList &dirs, bool paused);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT QString rescanIntervalString(int rescanInterval, bool fileSystemWatcherEnabled);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT bool isLocal(const QString &hostName);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT bool isLocal(const QString &hostName, const QHostAddress &hostAddress);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT bool setDirectoriesPaused(QJsonObject &syncthingConfig, const QStringList &dirIds, bool paused);
|
||||
LIB_SYNCTHING_CONNECTOR_EXPORT bool setDevicesPaused(QJsonObject &syncthingConfig, const QStringList &dirs, bool paused);
|
||||
|
||||
/*!
|
||||
* \brief Returns whether the host specified by the given \a url is the local machine.
|
||||
|
@ -47,17 +47,17 @@ inline bool isLocal(const QUrl &url)
|
|||
}
|
||||
|
||||
template <typename IntType = quint64, Traits::EnableIf<std::is_integral<IntType>> * = nullptr>
|
||||
inline IntType LIB_SYNCTHING_CONNECTOR_EXPORT jsonValueToInt(const QJsonValue &value, double defaultValue = 0.0)
|
||||
inline LIB_SYNCTHING_CONNECTOR_EXPORT IntType jsonValueToInt(const QJsonValue &value, double defaultValue = 0.0)
|
||||
{
|
||||
return static_cast<IntType>(value.toDouble(defaultValue));
|
||||
}
|
||||
|
||||
constexpr int LIB_SYNCTHING_CONNECTOR_EXPORT trQuandity(quint64 quandity)
|
||||
constexpr LIB_SYNCTHING_CONNECTOR_EXPORT int trQuandity(quint64 quandity)
|
||||
{
|
||||
return quandity > std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : static_cast<int>(quandity);
|
||||
}
|
||||
|
||||
template <class Objects, class Accessor> QStringList LIB_SYNCTHING_CONNECTOR_EXPORT things(const Objects &objects, Accessor accessor)
|
||||
template <class Objects, class Accessor> LIB_SYNCTHING_CONNECTOR_EXPORT QStringList things(const Objects &objects, Accessor accessor)
|
||||
{
|
||||
QStringList things;
|
||||
things.reserve(objects.size());
|
||||
|
@ -67,12 +67,12 @@ template <class Objects, class Accessor> QStringList LIB_SYNCTHING_CONNECTOR_EXP
|
|||
return things;
|
||||
}
|
||||
|
||||
template <class Objects> QStringList LIB_SYNCTHING_CONNECTOR_EXPORT ids(const Objects &objects)
|
||||
template <class Objects> LIB_SYNCTHING_CONNECTOR_EXPORT QStringList ids(const Objects &objects)
|
||||
{
|
||||
return things(objects, [](const auto &object) { return Traits::dereferenceMaybe(object).id; });
|
||||
}
|
||||
|
||||
template <class Objects> QStringList LIB_SYNCTHING_CONNECTOR_EXPORT displayNames(const Objects &objects)
|
||||
template <class Objects> LIB_SYNCTHING_CONNECTOR_EXPORT QStringList displayNames(const Objects &objects)
|
||||
{
|
||||
return things(objects, [](const auto &object) { return Traits::dereferenceMaybe(object).displayName(); });
|
||||
}
|
||||
|
|
|
@ -32,14 +32,14 @@ constexpr auto highestLogLevel = LogLevel::Fatal;
|
|||
|
||||
using LoggingCallback = std::function<void(LogLevel, const char *message, std::size_t messageSize)>;
|
||||
|
||||
void LIB_SYNCTHING_EXPORT setLoggingCallback(const LoggingCallback &callback);
|
||||
void LIB_SYNCTHING_EXPORT setLoggingCallback(LoggingCallback &&callback);
|
||||
std::int64_t LIB_SYNCTHING_EXPORT runSyncthing(const RuntimeOptions &options = RuntimeOptions{});
|
||||
bool LIB_SYNCTHING_EXPORT isSyncthingRunning();
|
||||
std::int64_t LIB_SYNCTHING_EXPORT stopSyncthing();
|
||||
std::string LIB_SYNCTHING_EXPORT ownDeviceId();
|
||||
std::string LIB_SYNCTHING_EXPORT syncthingVersion();
|
||||
std::string LIB_SYNCTHING_EXPORT longSyncthingVersion();
|
||||
LIB_SYNCTHING_EXPORT void setLoggingCallback(const LoggingCallback &callback);
|
||||
LIB_SYNCTHING_EXPORT void setLoggingCallback(LoggingCallback &&callback);
|
||||
LIB_SYNCTHING_EXPORT std::int64_t runSyncthing(const RuntimeOptions &options = RuntimeOptions{});
|
||||
LIB_SYNCTHING_EXPORT bool isSyncthingRunning();
|
||||
LIB_SYNCTHING_EXPORT std::int64_t stopSyncthing();
|
||||
LIB_SYNCTHING_EXPORT std::string ownDeviceId();
|
||||
LIB_SYNCTHING_EXPORT std::string syncthingVersion();
|
||||
LIB_SYNCTHING_EXPORT std::string longSyncthingVersion();
|
||||
|
||||
} // namespace LibSyncthing
|
||||
|
||||
|
|
|
@ -53,12 +53,12 @@ inline StatusIconColorSet::StatusIconColorSet(const QString &backgroundStart, co
|
|||
{
|
||||
}
|
||||
|
||||
QByteArray LIB_SYNCTHING_MODEL_EXPORT makeSyncthingIcon(
|
||||
LIB_SYNCTHING_MODEL_EXPORT QByteArray makeSyncthingIcon(
|
||||
const StatusIconColorSet &colors = StatusIconColorSet{ QStringLiteral("#26B6DB"), QStringLiteral("#0882C8"), QStringLiteral("#FFFFFF") },
|
||||
StatusEmblem statusEmblem = StatusEmblem::None);
|
||||
QPixmap LIB_SYNCTHING_MODEL_EXPORT renderSvgImage(const QString &path, const QSize &size = QSize(128, 128), int margin = 0);
|
||||
QPixmap LIB_SYNCTHING_MODEL_EXPORT renderSvgImage(const QByteArray &contents, const QSize &size = QSize(128, 128), int margin = 0);
|
||||
QByteArray LIB_SYNCTHING_MODEL_EXPORT loadFontAwesomeIcon(const QString &iconName, const QColor &color, bool solid = true);
|
||||
LIB_SYNCTHING_MODEL_EXPORT QPixmap renderSvgImage(const QString &path, const QSize &size = QSize(128, 128), int margin = 0);
|
||||
LIB_SYNCTHING_MODEL_EXPORT QPixmap renderSvgImage(const QByteArray &contents, const QSize &size = QSize(128, 128), int margin = 0);
|
||||
LIB_SYNCTHING_MODEL_EXPORT QByteArray loadFontAwesomeIcon(const QString &iconName, const QColor &color, bool solid = true);
|
||||
|
||||
struct LIB_SYNCTHING_MODEL_EXPORT StatusIconSettings {
|
||||
struct DarkTheme {
|
||||
|
|
|
@ -52,7 +52,7 @@ inline std::ostream &operator<<(std::ostream &o, const QSet<QString> &qstringset
|
|||
|
||||
namespace CppUtilities {
|
||||
|
||||
extern double SYNCTHINGTESTHELPER_EXPORT timeoutFactor;
|
||||
extern SYNCTHINGTESTHELPER_EXPORT double timeoutFactor;
|
||||
|
||||
/*!
|
||||
* \brief Waits for the \a duration specified in ms while keeping the event loop running.
|
||||
|
|
|
@ -13,7 +13,7 @@ class SyncthingConnection;
|
|||
|
||||
namespace QtGui {
|
||||
|
||||
QDialog SYNCTHINGWIDGETS_EXPORT *ownDeviceIdDialog(Data::SyncthingConnection &connection);
|
||||
SYNCTHINGWIDGETS_EXPORT QDialog *ownDeviceIdDialog(Data::SyncthingConnection &connection);
|
||||
}
|
||||
|
||||
#endif // SYNCTHINGWIDGETS_OTHERDIALOGS_H
|
||||
|
|
|
@ -156,9 +156,9 @@ struct SYNCTHINGWIDGETS_EXPORT Settings {
|
|||
void apply(Data::SyncthingNotifier ¬ifier) const;
|
||||
};
|
||||
|
||||
Settings SYNCTHINGWIDGETS_EXPORT &values();
|
||||
void SYNCTHINGWIDGETS_EXPORT restore();
|
||||
void SYNCTHINGWIDGETS_EXPORT save();
|
||||
SYNCTHINGWIDGETS_EXPORT Settings &values();
|
||||
SYNCTHINGWIDGETS_EXPORT void restore();
|
||||
SYNCTHINGWIDGETS_EXPORT void save();
|
||||
} // namespace Settings
|
||||
|
||||
#endif // SETTINGS_H
|
||||
|
|
Loading…
Reference in New Issue