Skip to content

Commit

Permalink
Fix spacing, remove leftover whitespace
Browse files Browse the repository at this point in the history
Blame @wiwaz
  • Loading branch information
LightArrowsEXE committed May 24, 2024
1 parent e059228 commit 701cdec
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 24 deletions.
18 changes: 17 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"files.associations": {
"*.embeddedhtml": "html",
"*.ejs": "ejs",
"*.html": "html",
"*.vpy": "python",
Expand Down Expand Up @@ -80,7 +81,22 @@
"xtree": "cpp",
"xutility": "cpp",
"qbuttongroup": "cpp",
"qapplication": "cpp"
"qapplication": "cpp",
"charconv": "cpp",
"format": "cpp",
"ios": "cpp",
"locale": "cpp",
"xfacet": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xtr1common": "cpp"
},
"files.exclude": {
"**/.git": true,
Expand Down
2 changes: 1 addition & 1 deletion src/shared/BookmarksModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ void BookmarksModel::clear() {
beginRemoveRows(QModelIndex(), 0, size() - 1);
BookmarkMap::clear();
endRemoveRows();
}
}
2 changes: 1 addition & 1 deletion src/shared/FrozenFramesModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ void FrozenFramesModel::clear() {
beginRemoveRows(QModelIndex(), 0, size() - 1);
FreezeFrameMap::clear();
endRemoveRows();
}
}
2 changes: 1 addition & 1 deletion src/shared/PresetsModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ void PresetsModel::clear() {
beginRemoveRows(QModelIndex(), 0, size() - 1);
PresetMap::clear();
endRemoveRows();
}
}
2 changes: 1 addition & 1 deletion src/shared/ScrollArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ void ScrollArea::wheelEvent(QWheelEvent *e) {
} else {
QScrollArea::wheelEvent(e);
}
}
}
4 changes: 2 additions & 2 deletions src/shared/WobblyProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,7 @@ void WobblyProject::setRangeMatchesFromPattern(int range_start, int range_end, c
for (int i = range_start; i <= range_end; i++) {
if ((i == 0 && (pattern[i % 5] == 'p' || pattern[i % 5] == 'b')))
continue;

if (i == getNumFrames(PostSource) - 1 && (pattern[i % 5] == 'n' || pattern[i % 5] == 'u')) {
if (pattern[i % 5] == 'n')
setMatch(i, 'b');
Expand Down Expand Up @@ -3610,7 +3610,7 @@ bool WobblyProject::guessSectionPatternsFromMicsAndDMetrics(int section_start, i

for (int i = section_start; i < section_end; i++)
setMatch(i, best_pattern[(i + best_pattern_offset) % best_pattern.size()]);

if (section_end == getNumFrames(PostSource) && getMatch(section_end - 1) == 'n')
setMatch(section_end - 1, 'b');

Expand Down
6 changes: 3 additions & 3 deletions src/shared/WobblyShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ GetVSScriptAPIFunc fetchVSScript() {
nError = RegQueryValueEx(hKey, L"VSScriptDLL", 0, nullptr, (LPBYTE)szBuffer, &dwBufferSize);
RegCloseKey(hKey);

if (ERROR_SUCCESS == nError)
if (ERROR_SUCCESS == nError)
vsscriptDLLpath = szBuffer;
}

if (vsscriptDLLpath.length()) {
hLib = LoadLibraryW(vsscriptDLLpath.c_str());
}

if (!hLib) {
#define CONCATENATE(x, y) x ## y
#define _Lstr(x) CONCATENATE(L, x)
Expand All @@ -164,4 +164,4 @@ GetVSScriptAPIFunc fetchVSScript() {
throw WobblyException("Failed to get address of getVSScriptAPI from " VSSCRIPT_SO);

return _getVSScriptAPI;
}
}
4 changes: 2 additions & 2 deletions src/wibbly/WibblyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void WibblyWindow::createVFMWindow() {
QVBoxLayout *vbox = new QVBoxLayout;
for (size_t i = 0; i < vfm_params.size(); i++)
vbox->addWidget(vfm_params[i].widget);

vfm_dmetrics_enabled = new QCheckBox("Enable DMetrics");
connect(vfm_dmetrics_enabled, &QCheckBox::clicked, parametersChanged);
vbox->addWidget(vfm_dmetrics_enabled);
Expand Down Expand Up @@ -1610,7 +1610,7 @@ void WibblyWindow::readSettings() {

if (settings.contains(KEY_MAXIMUM_CACHE_SIZE))
settings_cache_spin->setValue(settings.value(KEY_MAXIMUM_CACHE_SIZE).toInt());

if (settings.contains(KEY_LAST_CROP)) {
QList<QVariant> crop_list = settings.value(KEY_LAST_CROP).toList();
for (int i = 0; i < crop_list.size(); i++)
Expand Down
12 changes: 6 additions & 6 deletions src/wobbly/ImportWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ImportWindow::ImportWindow(const QString &_file_name, const ImportedThings &impo

QPushButton *browse_button = new QPushButton(QStringLiteral("&Browse"));
QPushButton *previous_button = new QPushButton(QStringLiteral("Previous in &series"));

QCheckBox *geometry_check = new QCheckBox(QStringLiteral("&Geometry"));
QCheckBox *zoom_check = new QCheckBox(QStringLiteral("&Zoom"));
QCheckBox *presets_check = new QCheckBox(QStringLiteral("&Presets"));
Expand All @@ -50,7 +50,7 @@ ImportWindow::ImportWindow(const QString &_file_name, const ImportedThings &impo
QCheckBox *resize_check = new QCheckBox(QStringLiteral("&Resize"));
QCheckBox *bits_check = new QCheckBox(QStringLiteral("Bit &depth"));
QCheckBox *mic_check = new QCheckBox(QStringLiteral("&Mic search threshold"));

geometry_check->setChecked(import_things.geometry);
zoom_check->setChecked(import_things.zoom);
presets_check->setChecked(import_things.presets);
Expand All @@ -61,7 +61,7 @@ ImportWindow::ImportWindow(const QString &_file_name, const ImportedThings &impo
mic_check->setChecked(import_things.mic_search);

QPushButton *cancel_button = new QPushButton(QStringLiteral("Cancel"));

QPushButton *import_button = new QPushButton(QStringLiteral("&Import"));
import_button->setDefault(true);

Expand All @@ -79,7 +79,7 @@ ImportWindow::ImportWindow(const QString &_file_name, const ImportedThings &impo
connect(previous_button, &QPushButton::clicked, [this] () {
emit previousWanted();
});

connect(cancel_button, &QPushButton::clicked, this, &ImportWindow::reject);

connect(import_button, &QPushButton::clicked, [this, geometry_check, presets_check, cl_check, crop_check, resize_check, bits_check, mic_check, zoom_check] () {
Expand All @@ -95,7 +95,7 @@ ImportWindow::ImportWindow(const QString &_file_name, const ImportedThings &impo

emit import(file_name, imports);
});


QVBoxLayout *vbox = new QVBoxLayout;
vbox->addWidget(new QLabel("Import from:"));
Expand Down Expand Up @@ -125,7 +125,7 @@ ImportWindow::ImportWindow(const QString &_file_name, const ImportedThings &impo
hbox->addWidget(cancel_button);
hbox->addStretch(1);
hbox->addWidget(import_button);

vbox->addLayout(hbox);


Expand Down
2 changes: 1 addition & 1 deletion src/wobbly/Wobbly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main(int argv, char **args) {
WobblyWindow w;

w.show();

if (app.arguments().size() == 2)
w.openFile(app.arguments()[1]);

Expand Down
8 changes: 4 additions & 4 deletions src/wobbly/WobblyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ void WobblyWindow::createShortcuts() {
{ "", "", "Set decimation pattern to range", &WobblyWindow::setDecimationPattern },
{ "", "", "Set match and decimation patterns to range", &WobblyWindow::setMatchAndDecimationPatterns },
{ "", "F5", "Toggle preview mode", &WobblyWindow::togglePreview },
{ "", "Ctrl++", "Zoom in", &WobblyWindow::zoomIn },
{ "", "Ctrl+-", "Zoom out", &WobblyWindow::zoomOut },
{ "", "Ctrl++", "Zoom in", &WobblyWindow::zoomIn },
{ "", "Ctrl+-", "Zoom out", &WobblyWindow::zoomOut },
{ "", "", "Guess current section's patterns from matches", &WobblyWindow::guessCurrentSectionPatternsFromMatches },
{ "", "", "Guess every section's patterns from matches", &WobblyWindow::guessProjectPatternsFromMatches },
{ "", "Ctrl+Alt+G", "Guess current section's patterns from mics", &WobblyWindow::guessCurrentSectionPatternsFromMics },
Expand Down Expand Up @@ -3053,7 +3053,7 @@ void WobblyWindow::createPluginWindow() {
plugin_table->setHorizontalHeaderLabels({ "Plugin", "Status" });
int row = 0;
for (const auto &iter : filters) {
plugin_table->setItem(row, 0, new QTableWidgetItem(iter.first.c_str()));
plugin_table->setItem(row, 0, new QTableWidgetItem(iter.first.c_str()));
plugin_table->setItem(row, 1, new QTableWidgetItem((iter.second == FilterState::Exists) ? "Available" : ((iter.second == FilterState::MissingFilter) ? "Invalid version" : "Missing")));
row++;
}
Expand Down Expand Up @@ -3322,7 +3322,7 @@ void WobblyWindow::initialiseVapourSynth() {

if (!vssapi)
throw WobblyException("Fatal error: failed to initialise VSScript. Your VapourSynth installation is probably broken. Python probably couldn't 'import vapoursynth'.");

vsapi = vssapi->getVSAPI(VAPOURSYNTH_API_VERSION);
if (!vsapi)
throw WobblyException("Fatal error: failed to acquire VapourSynth API struct. Did you update the VapourSynth library but not the Python module (or the other way around)?");
Expand Down
2 changes: 1 addition & 1 deletion src/wobbly/WobblyWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class WobblyWindow : public QMainWindow {

DockWidget *mic_search_dock;
QSpinBox *mic_search_minimum_spin;

DockWidget *dmetric_search_dock;
QSpinBox *dmetric_search_minimum_spin;

Expand Down

0 comments on commit 701cdec

Please sign in to comment.