Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unnecessary includes #12008

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions OWNCLOUD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )

set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-background.png" CACHE STRING "The MacOSX installer background image")

set( THEME_INCLUDE "owncloudtheme.h" )

# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
# set( APPLICATION_LICENSE "${OEM_THEME_DIR}/license.txt )

Expand Down
2 changes: 0 additions & 2 deletions src/cmd/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
#include <QDebug>
#include <QFile>
#include <QFileInfo>
#include <QJsonDocument>
#include <QJsonObject>
#include <QNetworkProxy>
#include <QStringList>
#include <QUrl>

#include <iostream>
Expand Down
1 change: 0 additions & 1 deletion src/common/filesystembase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <QDir>
#include <QFile>
#include <QSettings>
#include <QUrl>

#include <sys/stat.h>
#include <sys/types.h>
Expand Down
2 changes: 0 additions & 2 deletions src/common/ownsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QLoggingCategory>
#include <QString>

#include "common/asserts.h"
Expand All @@ -31,7 +30,6 @@

#include <sqlite3.h>

#include <chrono>
#include <thread>

using namespace std::chrono_literals;
Expand Down
1 change: 0 additions & 1 deletion src/csync/csync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

#include "csync.h"
#include "moc_csync.cpp"

#include <QMetaEnum>

Expand Down
8 changes: 3 additions & 5 deletions src/csync/csync_exclude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

#include "config.h"
#include "config_csync.h"

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
Expand All @@ -30,10 +29,9 @@
#include "common/utility.h"
#include "common/version.h"

#include <QString>
#include <QFileInfo>
#include <QFile>
#include <QDir>
#include <QFileInfo>
#include <QString>

namespace {

Expand Down Expand Up @@ -97,7 +95,7 @@ OCSYNC_EXPORT void csync_exclude_expand_escapes(QByteArray &input)

/**
* @brief Checks if filename is considered reserved by Windows
* @param file_name filename
* @param filename filename
* @return true if file is reserved, false otherwise
*/
OCSYNC_EXPORT bool csync_is_windows_reserved_word(QStringView filename)
Expand Down
1 change: 0 additions & 1 deletion src/csync/std/c_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "c_time.h"

#include "common/filesystembase.h"
#include "common/utility.h"

#include <QFile>

Expand Down
5 changes: 2 additions & 3 deletions src/gui/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
#include "aboutdialog.h"
#include "ui_aboutdialog.h"

#include "common/restartmanager.h"
#include "gui/guiutility.h"
#include "libsync/configfile.h"
#include "libsync/theme.h"

#ifdef WITH_AUTO_UPDATER
#include "libsync/configfile.h"
#include "updater/ocupdater.h"
#ifdef Q_OS_MAC
// FIXME We should unify those, but Sparkle does everything behind the scene transparently
Expand Down Expand Up @@ -71,7 +70,7 @@ void AboutDialog::openBrowserFromUrl(const QUrl &s)
void AboutDialog::setupUpdaterWidget()
{
#ifdef WITH_AUTO_UPDATER
// non standard update channels are only supported by the vanilla theme and the testpilotcloud theme
// non-standard update channels are only supported by the vanilla theme and the testpilotcloud theme
if (!Resources::isVanillaTheme() && !isTestPilotCloudTheme()) {
if (Utility::isMac()) {
// Because we don't have any statusString from the SparkleUpdater anyway we can hide the whole thing
Expand Down
4 changes: 1 addition & 3 deletions src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@
#include "configfile.h"
#include "creds/credentialmanager.h"
#include "guiutility.h"
#include <cookiejar.h>
#include <creds/httpcredentialsgui.h>
#include <theme.h>

#ifdef Q_OS_WIN
#include "common/utility_win.h"
#endif

#include <QSettings>
#include <QDir>
#include <QNetworkAccessManager>
#include <QSettings>

namespace {
auto urlC()
Expand Down
1 change: 0 additions & 1 deletion src/gui/accountstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "gui/tlserrordialog.h"

#include "logger.h"
#include "settingsdialog.h"
#include "socketapi/socketapi.h"
#include "theme.h"

Expand Down
1 change: 0 additions & 1 deletion src/gui/activitywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "openfilemanager.h"
#include "protocolwidget.h"
#include "servernotificationhandler.h"
#include "syncresult.h"
#include "theme.h"

#include "models/activitylistmodel.h"
Expand Down
5 changes: 0 additions & 5 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "account.h"
#include "accountmanager.h"
#include "accountstate.h"
#include "common/asserts.h"
#include "common/version.h"
#include "common/vfs.h"
#include "configfile.h"
Expand All @@ -31,7 +30,6 @@
#include "sharedialog.h"
#include "socketapi/socketapi.h"
#include "theme.h"
#include "translations.h"

#ifdef WITH_AUTO_UPDATER
#include "updater/ocupdater.h"
Expand All @@ -43,10 +41,7 @@

#include <QApplication>
#include <QDesktopServices>
#include <QDir>
#include <QFileOpenEvent>
#include <QMessageBox>
#include <QPushButton>

namespace OCC {

Expand Down
7 changes: 1 addition & 6 deletions src/gui/connectionvalidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@
#include "gui/networkinformation.h"
#include "gui/tlserrordialog.h"
#include "libsync/account.h"
#include "libsync/cookiejar.h"
#include "libsync/creds/abstractcredentials.h"
#include "libsync/networkjobs.h"
#include "libsync/networkjobs/checkserverjobfactory.h"
#include "libsync/networkjobs/jsonjob.h"
#include "libsync/theme.h"

#include <QJsonDocument>
#include <QJsonObject>
#include <QLoggingCategory>
#include <QNetworkReply>
#include <QNetworkProxyFactory>
#include <QXmlStreamReader>

#include <QNetworkReply>

using namespace std::chrono_literals;

Expand Down
5 changes: 2 additions & 3 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@
#include <QDir>
#include <QSettings>

#include <QMessageBox>
#include <QPushButton>
#include <QApplication>
#include <QMessageBox>

using namespace std::chrono_literals;

namespace {
/* How oftern to retry a sync
/* How often to retry a sync
* Either due to _engine->isAnotherSyncNeeded or a sync error
*/
constexpr int retrySyncLimitC = 3;
Expand Down
4 changes: 0 additions & 4 deletions src/gui/folderstatusmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@
#include "gui/quotainfo.h"
#include "theme.h"

#include "resources/resources.h"

#include "libsync/graphapi/space.h"
#include "libsync/graphapi/spacesmanager.h"

#include <QApplication>
#include <QDir>
#include <QFileIconProvider>
#include <QRandomGenerator>
#include <QVarLengthArray>

#include <set>

Expand Down
5 changes: 1 addition & 4 deletions src/gui/folderwatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
// event masks
#include "folderwatcher.h"

#include <stdint.h>
#include <cstdint>

#include <QFileInfo>
#include <QFlags>
#include <QStringList>
#include <QThread>
#include <QTimer>

#if defined(Q_OS_WIN)
Expand Down
1 change: 0 additions & 1 deletion src/gui/folderwizard/folderwizardremotepath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "folderwizardremotepath.h"
#include "ui_folderwizardtargetpage.h"

#include "folderwizard.h"
#include "folderwizard_p.h"

#include "gui/folderman.h"
Expand Down
2 changes: 0 additions & 2 deletions src/gui/folderwizard/spacespage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#include "spacespage.h"
#include "ui_spacespage.h"

#include <QModelIndex>

using namespace OCC;

SpacesPage::SpacesPage(AccountPtr acc, QWidget *parent)
Expand Down
6 changes: 2 additions & 4 deletions src/gui/ignorelisteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@

#include "configfile.h"
#include "gui/folderman.h"
#include "gui/guiutility.h"

#include <QFile>
#include <QDir>
#include <QListWidget>
#include <QFile>
#include <QInputDialog>
#include <QListWidgetItem>
#include <QMessageBox>
#include <QInputDialog>

namespace OCC {

Expand Down
6 changes: 0 additions & 6 deletions src/gui/logbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,10 @@
#include "stdio.h"
#include <iostream>

#include <QAction>
#include <QCoreApplication>
#include <QDesktopServices>
#include <QDialogButtonBox>
#include <QDir>
#include <QLabel>
#include <QLayout>
#include <QMessageBox>
#include <QPushButton>
#include <QSettings>
#include <QTextStream>
#include <optional>

Expand Down
1 change: 0 additions & 1 deletion src/gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "accountmanager.h"
#include "common/restartmanager.h"
#include "common/utility.h"
#include "gui/application.h"
#include "gui/logbrowser.h"
#include "gui/networkinformation.h"
Expand Down
10 changes: 2 additions & 8 deletions src/gui/models/activitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@
* for more details.
*/

#include <QtCore>
#include <QAbstractListModel>
#include <QWidget>
#include <QIcon>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonObject>
#include <QtCore>

#include "accessmanager.h"
#include "account.h"
#include "accountmanager.h"
#include "accountstate.h"
#include "folderman.h"
#include "guiutility.h"
#include "models.h"
#include "networkjobs/jsonjob.h"

#include "resources/resources.h"

#include "activitydata.h"
#include "activitylistmodel.h"

Expand Down
2 changes: 0 additions & 2 deletions src/gui/models/expandingheaderview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
#include "configfile.h"

#include <QApplication>
#include <QDebug>
#include <QMenu>
#include <QScopedValueRollback>

using namespace OCC;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/newwizard/navigation.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "navigation.h"

#include <QDebug>
#include <QHBoxLayout>
#include <QRadioButton>

namespace OCC::Wizard {
Expand Down
1 change: 0 additions & 1 deletion src/gui/newwizard/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "enums.h"

#include <QHBoxLayout>
#include <QMap>
#include <QRadioButton>
#include <QString>
Expand Down
3 changes: 0 additions & 3 deletions src/gui/newwizard/pages/accountconfiguredwizardpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
#include "ui_accountconfiguredwizardpage.h"

#include "gui/application.h"
#include "gui/guiutility.h"
#include "gui/settingsdialog.h"
#include "libsync/theme.h"

#include "resources/resources.h"

#include <QDir>
#include <QFileDialog>
#include <QMessageBox>


namespace OCC::Wizard {
Expand Down
2 changes: 0 additions & 2 deletions src/gui/newwizard/pages/accountconfiguredwizardpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "abstractsetupwizardpage.h"
#include "setupwizardcontroller.h"

#include <QSharedPointer>

namespace Ui {
class AccountConfiguredWizardPage;
}
Expand Down
1 change: 0 additions & 1 deletion src/gui/newwizard/postfixlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* for more details.
*/

#include <QStyle>
#include <QStyleOptionFrame>

#include "postfixlineedit.h"
Expand Down
Loading
Loading