aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorTayou <tayou@gmx.net>2023-06-28 23:02:34 +0200
committerTayou <tayou@gmx.net>2023-06-28 23:08:04 +0200
commit1dc7f800347d6b4e179a12de14af7f4ad87b7f27 (patch)
treeb5613bbea5a7fadb13e27247104c76c042bb93a2 /launcher
parent534d156b1239aed19c9d36a88ff23d84127ac002 (diff)
downloadPrismLauncher-1dc7f800347d6b4e179a12de14af7f4ad87b7f27.tar.gz
PrismLauncher-1dc7f800347d6b4e179a12de14af7f4ad87b7f27.tar.bz2
PrismLauncher-1dc7f800347d6b4e179a12de14af7f4ad87b7f27.zip
4 clang-tidy changes, update copyright info
while already at it I updated all my emails to use one from my domain Signed-off-by: Tayou <tayou@gmx.net>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/Application.cpp2
-rw-r--r--launcher/Application.h2
-rw-r--r--launcher/ui/instanceview/VisualGroup.cpp12
-rw-r--r--launcher/ui/instanceview/VisualGroup.h48
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp2
-rw-r--r--launcher/ui/setupwizard/ThemeWizardPage.cpp2
-rw-r--r--launcher/ui/setupwizard/ThemeWizardPage.h2
-rw-r--r--launcher/ui/themes/CustomTheme.cpp2
-rw-r--r--launcher/ui/themes/CustomTheme.h2
-rw-r--r--launcher/ui/themes/ITheme.cpp2
-rw-r--r--launcher/ui/themes/ITheme.h2
-rw-r--r--launcher/ui/themes/SystemTheme.cpp2
-rw-r--r--launcher/ui/themes/SystemTheme.h2
-rw-r--r--launcher/ui/themes/ThemeManager.cpp2
-rw-r--r--launcher/ui/themes/ThemeManager.h2
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.cpp2
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.h2
17 files changed, 56 insertions, 34 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 1d97a5f2..8e1d0cbd 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -6,7 +6,7 @@
* Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (C) 2022 Lenny McLennington <lenny@sneed.church>
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
* Copyright (C) 2023 TheKodeToad <TheKodeToad@proton.me>
* Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
*
diff --git a/launcher/Application.h b/launcher/Application.h
index ced0af17..527c536b 100644
--- a/launcher/Application.h
+++ b/launcher/Application.h
@@ -2,7 +2,7 @@
/*
* Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
* Copyright (C) 2023 TheKodeToad <TheKodeToad@proton.me>
*
* This program is free software: you can redistribute it and/or modify
diff --git a/launcher/ui/instanceview/VisualGroup.cpp b/launcher/ui/instanceview/VisualGroup.cpp
index 9b2189b8..8663633b 100644
--- a/launcher/ui/instanceview/VisualGroup.cpp
+++ b/launcher/ui/instanceview/VisualGroup.cpp
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ * Copyright (C) 2023 Tayou <git@tayou.org>
*
* 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
@@ -40,10 +41,11 @@
#include <QModelIndex>
#include <QPainter>
#include <QtMath>
+#include <utility>
#include "InstanceView.h"
-VisualGroup::VisualGroup(const QString& text, InstanceView* view) : view(view), text(text), collapsed(false) {}
+VisualGroup::VisualGroup(QString text, InstanceView* view) : view(view), text(std::move(text)), collapsed(false) {}
VisualGroup::VisualGroup(const VisualGroup* other) : view(other->view), text(other->text), collapsed(other->collapsed) {}
@@ -138,7 +140,7 @@ VisualGroup::HitResults VisualGroup::hitScan(const QPoint& pos) const
return results;
}
-void VisualGroup::drawHeader(QPainter* painter, const QStyleOptionViewItem& option)
+void VisualGroup::drawHeader(QPainter* painter, const QStyleOptionViewItem& option) const
{
QRect optRect = option.rect;
optRect.setTop(optRect.top() + 7);
@@ -202,7 +204,7 @@ int VisualGroup::totalHeight() const
return headerHeight() + contentHeight();
}
-int VisualGroup::headerHeight() const
+int VisualGroup::headerHeight()
{
QFont font(QApplication::font());
font.setBold(true);
@@ -231,7 +233,7 @@ int VisualGroup::contentHeight() const
int VisualGroup::numRows() const
{
- return rows.size();
+ return (int)rows.size();
}
int VisualGroup::verticalPosition() const
diff --git a/launcher/ui/instanceview/VisualGroup.h b/launcher/ui/instanceview/VisualGroup.h
index 5a743aa1..697298c2 100644
--- a/launcher/ui/instanceview/VisualGroup.h
+++ b/launcher/ui/instanceview/VisualGroup.h
@@ -1,16 +1,36 @@
-/* Copyright 2013-2021 MultiMC Contributors
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * Prism Launcher - Minecraft Launcher
+ * Copyright (C) 2023 Tayou <git@tayou.org>
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#pragma once
@@ -42,8 +62,8 @@ struct VisualRow
struct VisualGroup
{
/* constructors */
- VisualGroup(const QString &text, InstanceView *view);
- VisualGroup(const VisualGroup *other);
+ VisualGroup(QString text, InstanceView *view);
+ explicit VisualGroup(const VisualGroup *other);
/* data */
InstanceView *view = nullptr;
@@ -58,13 +78,13 @@ struct VisualGroup
void update();
/// draw the header at y-position.
- void drawHeader(QPainter *painter, const QStyleOptionViewItem &option);
+ void drawHeader(QPainter *painter, const QStyleOptionViewItem &option) const;
/// height of the group, in total. includes a small bit of padding.
int totalHeight() const;
/// height of the group header, in pixels
- int headerHeight() const;
+ static int headerHeight() ;
/// height of the group content, in pixels
int contentHeight() const;
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 816dde72..2080b56f 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -3,7 +3,7 @@
* Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (c) 2022 dada513 <dada513@protonmail.com>
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/setupwizard/ThemeWizardPage.cpp b/launcher/ui/setupwizard/ThemeWizardPage.cpp
index 42826aba..c3e0a524 100644
--- a/launcher/ui/setupwizard/ThemeWizardPage.cpp
+++ b/launcher/ui/setupwizard/ThemeWizardPage.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/setupwizard/ThemeWizardPage.h b/launcher/ui/setupwizard/ThemeWizardPage.h
index 61a3d0c0..f3d40b6d 100644
--- a/launcher/ui/setupwizard/ThemeWizardPage.h
+++ b/launcher/ui/setupwizard/ThemeWizardPage.h
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/CustomTheme.cpp b/launcher/ui/themes/CustomTheme.cpp
index 198e76ba..177edefa 100644
--- a/launcher/ui/themes/CustomTheme.cpp
+++ b/launcher/ui/themes/CustomTheme.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/CustomTheme.h b/launcher/ui/themes/CustomTheme.h
index f2b1b06e..3ec4cafa 100644
--- a/launcher/ui/themes/CustomTheme.h
+++ b/launcher/ui/themes/CustomTheme.h
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/ITheme.cpp b/launcher/ui/themes/ITheme.cpp
index 8f0757e1..42d63b11 100644
--- a/launcher/ui/themes/ITheme.cpp
+++ b/launcher/ui/themes/ITheme.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/ITheme.h b/launcher/ui/themes/ITheme.h
index a0a638bd..d85e7f98 100644
--- a/launcher/ui/themes/ITheme.h
+++ b/launcher/ui/themes/ITheme.h
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/SystemTheme.cpp b/launcher/ui/themes/SystemTheme.cpp
index 3a746d02..3b8cb24a 100644
--- a/launcher/ui/themes/SystemTheme.cpp
+++ b/launcher/ui/themes/SystemTheme.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/SystemTheme.h b/launcher/ui/themes/SystemTheme.h
index 05f31233..4f7d83e5 100644
--- a/launcher/ui/themes/SystemTheme.h
+++ b/launcher/ui/themes/SystemTheme.h
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/ThemeManager.cpp b/launcher/ui/themes/ThemeManager.cpp
index 94ac8a24..b50c6157 100644
--- a/launcher/ui/themes/ThemeManager.cpp
+++ b/launcher/ui/themes/ThemeManager.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/themes/ThemeManager.h b/launcher/ui/themes/ThemeManager.h
index 87f36d9c..d2a6fb70 100644
--- a/launcher/ui/themes/ThemeManager.h
+++ b/launcher/ui/themes/ThemeManager.h
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/widgets/ThemeCustomizationWidget.cpp b/launcher/ui/widgets/ThemeCustomizationWidget.cpp
index dcf13303..3bfcd821 100644
--- a/launcher/ui/widgets/ThemeCustomizationWidget.cpp
+++ b/launcher/ui/widgets/ThemeCustomizationWidget.cpp
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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
diff --git a/launcher/ui/widgets/ThemeCustomizationWidget.h b/launcher/ui/widgets/ThemeCustomizationWidget.h
index d955a266..6c33c3c5 100644
--- a/launcher/ui/widgets/ThemeCustomizationWidget.h
+++ b/launcher/ui/widgets/ThemeCustomizationWidget.h
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
*
* 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