Skip to content
Merged
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
9 changes: 9 additions & 0 deletions src/gui/cloudproviders/cloudproviderwrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2014 ownCloud GmbH
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <glib.h>

Check failure on line 7 in src/gui/cloudproviders/cloudproviderwrapper.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/cloudproviders/cloudproviderwrapper.cpp:7:10 [clang-diagnostic-error]

'glib.h' file not found
#include <gio/gio.h>
#include <cloudprovidersaccountexporter.h>
#include <cloudprovidersproviderexporter.h>
Expand All @@ -21,6 +21,8 @@

using namespace OCC;

Q_LOGGING_CATEGORY(lcNextcloudCloudProviderIntegration, "nextcloud.cloudprovider.integration", QtInfoMsg)

Check warning on line 24 in src/gui/cloudproviders/cloudproviderwrapper.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/cloudproviders/cloudproviderwrapper.cpp:24:1 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'Q_LOGGING_CATEGORY' is non-const and globally accessible, consider making it const

GSimpleActionGroup *actionGroup = nullptr;

int CloudProviderWrapper::preferredTextWidth = 0;
Expand Down Expand Up @@ -55,6 +57,11 @@
g_clear_object (&action_group);
}

void mainMenuWasDeleted(gpointer data, GObject *where_the_object_was)
{
qCDebug(lcNextcloudCloudProviderIntegration) << "I was deleted" << data << where_the_object_was;
}

CloudProviderWrapper::~CloudProviderWrapper()
{
g_object_unref(_cloudProviderAccount);
Expand Down Expand Up @@ -222,6 +229,8 @@
GMenuItem* item = nullptr;

_mainMenu = g_menu_new();
g_object_ref(_mainMenu);
g_object_weak_ref(reinterpret_cast<GObject*>(_mainMenu), mainMenuWasDeleted, this);

section = g_menu_new();
item = addMenuItem(tr("Open %1 Desktop", "Open Nextcloud main window. Placeholer will be the application name. Please keep it.").arg(APPLICATION_NAME), "cloudprovider.openmaindialog");
Expand Down
Loading