diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/previewgenerator.cpp | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/previewgenerator.cpp')
| -rw-r--r-- | src/previewgenerator.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/previewgenerator.cpp b/src/previewgenerator.cpp index 7006ad1b..ba73c065 100644 --- a/src/previewgenerator.cpp +++ b/src/previewgenerator.cpp @@ -20,8 +20,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "previewgenerator.h" #include <QFileInfo> -#include <QLabel> #include <QImageReader> +#include <QLabel> #include <QTextEdit> #include <utility.h> @@ -29,12 +29,13 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. using namespace MOBase; -PreviewGenerator::PreviewGenerator(const PluginContainer& pluginContainer) : - m_PluginContainer(pluginContainer) { +PreviewGenerator::PreviewGenerator(const PluginContainer& pluginContainer) + : m_PluginContainer(pluginContainer) +{ m_MaxSize = QGuiApplication::primaryScreen()->size() * 0.8; } -bool PreviewGenerator::previewSupported(const QString &fileExtension) const +bool PreviewGenerator::previewSupported(const QString& fileExtension) const { auto& previews = m_PluginContainer.plugins<IPluginPreview>(); for (auto* preview : previews) { @@ -45,12 +46,13 @@ bool PreviewGenerator::previewSupported(const QString &fileExtension) const return false; } -QWidget *PreviewGenerator::genPreview(const QString &fileName) const +QWidget* PreviewGenerator::genPreview(const QString& fileName) const { const QString ext = QFileInfo(fileName).suffix().toLower(); - auto& previews = m_PluginContainer.plugins<IPluginPreview>(); + auto& previews = m_PluginContainer.plugins<IPluginPreview>(); for (auto* preview : previews) { - if (m_PluginContainer.isEnabled(preview) && preview->supportedExtensions().contains(ext)) { + if (m_PluginContainer.isEnabled(preview) && + preview->supportedExtensions().contains(ext)) { return preview->genFilePreview(fileName, m_MaxSize); } } |
