forked from quickshell/quickshell
all: fix gcc warnings
This commit is contained in:
parent
92252c36a3
commit
b528be9426
19 changed files with 57 additions and 22 deletions
|
@ -153,7 +153,7 @@ void FileView::loadSync() {
|
|||
auto state = FileViewState();
|
||||
this->updateState(state);
|
||||
} else if (!this->blockUntilLoaded()) {
|
||||
auto state = FileViewState {.path = this->targetPath};
|
||||
auto state = FileViewState(this->targetPath);
|
||||
FileViewReader::read(state, false);
|
||||
this->updateState(state);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <qlogging.h>
|
||||
#include <qmutex.h>
|
||||
#include <qobject.h>
|
||||
|
@ -15,6 +17,9 @@
|
|||
namespace qs::io {
|
||||
|
||||
struct FileViewState {
|
||||
FileViewState() = default;
|
||||
explicit FileViewState(QString path): path(std::move(path)) {}
|
||||
|
||||
QString path;
|
||||
QString text;
|
||||
QByteArray data;
|
||||
|
|
|
@ -247,7 +247,7 @@ void IpcHandlerRegistry::deregisterHandler(IpcHandler* handler) {
|
|||
}
|
||||
}
|
||||
|
||||
handler->registeredState = {.enabled = false, .target = ""};
|
||||
handler->registeredState = IpcHandler::RegistrationState(false);
|
||||
}
|
||||
|
||||
QString IpcHandler::listMembers(qsizetype indent) {
|
||||
|
|
|
@ -172,12 +172,14 @@ private:
|
|||
void updateRegistration(bool destroying = false);
|
||||
|
||||
struct RegistrationState {
|
||||
explicit RegistrationState(bool enabled = false): enabled(enabled) {}
|
||||
|
||||
bool enabled = false;
|
||||
QString target;
|
||||
};
|
||||
|
||||
RegistrationState registeredState;
|
||||
RegistrationState targetState {.enabled = true};
|
||||
RegistrationState targetState {true};
|
||||
bool complete = false;
|
||||
|
||||
QHash<QString, IpcFunction> functionMap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue