Commit af3b9699 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Remove unused dependencies from kdelibs4support

Removed uses of KMenu, KMenuBar, KStatusBar
Removed <KDE/...> prefix in includes
Removed unused includes
parent 04eba24b
......@@ -21,9 +21,9 @@
#include "breakpoint.h"
#include <KDE/KLocale>
#include <KDE/KConfigGroup>
#include <KDE/KDebug>
#include <KLocale>
#include <KConfigGroup>
#include <KDebug>
#include "breakpointmodel.h"
#include "../../interfaces/icore.h"
......
......@@ -24,7 +24,7 @@
#include "ibreakpointcontroller.h"
#include <KDE/KDebug> // remove later
#include <KDebug> // remove later
#include <KNotification>
#include <KLocalizedString>
#include <KGlobal>
......
......@@ -25,6 +25,7 @@
#include <QKeyEvent>
#include <QFocusEvent>
#include <QVBoxLayout>
#include <QMenu>
#include <QPoint>
#include <QClipboard>
......@@ -32,7 +33,6 @@
#include <kmessagebox.h>
#include <khistorycombobox.h>
#include <kdebug.h>
#include <kmenu.h>
#include <klineedit.h>
#include <kdeversion.h>
#include <kiconloader.h>
......@@ -331,7 +331,7 @@ void VariableTree::contextMenuEvent(QContextMenuEvent* event)
if (RecentItem* recent = qobject_cast<RecentItem*>(item))
{
KMenu popup(this);
QMenu popup(this);
popup.addTitle(i18n("Recent Expressions"));
QAction* remove = popup.addAction(QIcon::fromTheme("editdelete"), i18n("Remove All"));
QAction* reevaluate = popup.addAction(QIcon::fromTheme("reload"), i18n("Re-evaluate All"));
......@@ -356,8 +356,8 @@ void VariableTree::contextMenuEvent(QContextMenuEvent* event)
}
else
{
activePopup_ = new KMenu(this);
KMenu format(this);
activePopup_ = new QMenu(this);
QMenu format(this);
QAction* remember = 0;
QAction* remove = 0;
......
......@@ -26,8 +26,6 @@
#include "../util/treeview.h"
#include "variablecollection.h"
class KMenu;
class KLineEdit;
class KHistoryComboBox;
namespace KDevelop
......@@ -103,7 +101,7 @@ private: // helper functions
void copyToClipboard(AbstractVariableItem* item);
KMenu* activePopup_;
QMenu* activePopup_;
QAction* toggleWatch_;
#endif
private:
......
......@@ -36,7 +36,7 @@ Boston, MA 02110-1301, USA.
#include <QStringList>
#include <QMimeType>
#include <KDE/KUrl>
#include <KUrl>
template <typename T> class QList;
......@@ -58,7 +58,7 @@ The plugin that originally gets the contextmenu event shouldn't add its own
actions directly to the menu but instead use the same mechanism.
<b>How to show a context menu from a plugin:</b>
-# Create a KMenu in context menu event handler: @code KMenu menu(this); @endcode
-# Create a QMenu in context menu event handler: @code QMenu menu(this); @endcode
-# Create a context: @code FileContext context(list). @endcode
-# Query for plugins:
@code @code QList<ContextMenuExtension> extensions =
......
......@@ -35,7 +35,6 @@ Boston, MA 02110-1301, USA.
#include "interfacesexport.h"
class QExtensionManager;
class KMenu;
namespace KDevelop
{
......
......@@ -18,7 +18,7 @@
*/
#include "isourceformatter.h"
#include <KDE/KLocale>
#include <KLocale>
namespace KDevelop
{
......
......@@ -25,7 +25,7 @@
#include <QPointer>
#include <KDE/KUrl>
#include <KUrl>
#include <ThreadWeaver/Sequence>
......
......@@ -20,7 +20,7 @@
#ifndef KDEVPLATFORM_APPLYCHANGESWIDGET_H
#define KDEVPLATFORM_APPLYCHANGESWIDGET_H
#include <KDE/KDialog>
#include <KDialog>
#include <language/languageexport.h>
namespace KTextEditor {
......
......@@ -22,9 +22,9 @@
#include "colorcache.h"
#include "configurablecolors.h"
#include <KDE/KColorScheme>
#include <KDE/KColorUtils>
#include <KDE/KGlobalSettings>
#include <KColorScheme>
#include <KColorUtils>
#include <KGlobalSettings>
#include "../../interfaces/icore.h"
#include "../../interfaces/ilanguagecontroller.h"
......
......@@ -20,9 +20,9 @@
#define KDEVPLATFORM_IQUICKOPEN_H
#include <QtCore/QSet>
#include <KDE/KUrl>
#include <KUrl>
#include <language/languageexport.h>
#include <KDE/KLineEdit>
#include <KLineEdit>
class QStringList;
......
......@@ -24,7 +24,7 @@
#include <QtCore/QList>
#include <QtCore/QObject>
#include <QtCore/QSet>
#include <KDE/KUrl>
#include <KUrl>
#include <ksharedptr.h>
#include <language/languageexport.h>
......
......@@ -20,7 +20,7 @@
#ifndef KDEVPLATFORM_PLUGIN_APPLETSELECTOR_H
#define KDEVPLATFORM_PLUGIN_APPLETSELECTOR_H
#include <KDE/KDialog>
#include <KDialog>
#include <KPluginInfo>
class QStandardItemModel;
......
......@@ -24,13 +24,13 @@ Boston, MA 02110-1301, USA.
#include <QDir>
#include <QHeaderView>
#include <QMenu>
#include <QContextMenuEvent>
#include <QSortFilterProxyModel>
#include <kaction.h>
#include <KLocalizedString>
#include <kurl.h>
#include <kmenu.h>
#include <kiconloader.h>
#include <kstandardaction.h>
#include <klocalizedstring.h>
......@@ -178,7 +178,7 @@ void KDevDocumentView::contextMenuEvent( QContextMenuEvent * event )
if (!m_selectedDocs.isEmpty())
{
KMenu* ctxMenu = new KMenu(this);
QMenu* ctxMenu = new QMenu(this);
KDevelop::FileContext context(m_selectedDocs);
QList<KDevelop::ContextMenuExtension> extensions =
......
......@@ -32,7 +32,6 @@ class KDevDocumentModel;
class KDevDocumentViewDelegate;
class KDevDocumentSelection;
class KDevFileItem;
class KMenu;
namespace KDevelop
{
class IDocument;
......
......@@ -29,8 +29,6 @@
#include <QObject>
class FileManager;
class KMenu;
class KUrl;
class BookmarkHandler : public QObject, public KBookmarkOwner
{
......
......@@ -23,7 +23,7 @@
#include <QtCore/QString>
#include <QTextCharFormat>
#include <QTextEdit>
#include <KDE/KLocalizedString>
#include <KLocalizedString>
/// Recomended summary limit from http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
static const int summarySoftLimit = 50;
......
......@@ -23,6 +23,8 @@
#include <QVariantList>
#include <QMimeDatabase>
#include <QMimeType>
#include <QApplication>
#include <QMenu>
#include <kpluginfactory.h>
#include <kpluginloader.h>
......@@ -38,7 +40,6 @@
#include <kservicetypetrader.h>
#include <kmimetypetrader.h>
#include <QSignalMapper>
#include <kmenu.h>
#include <krun.h>
#include <interfaces/icore.h>
#include <interfaces/iuicontroller.h>
......@@ -46,8 +47,8 @@
#include <interfaces/idocumentcontroller.h>
#include <kparts/mainwindow.h>
#include <KMessageBox>
#include <QApplication>
#include <KConfigGroup>
using namespace KDevelop;
K_PLUGIN_FACTORY(KDevOpenWithFactory, registerPlugin<OpenWithPlugin>(); )
......@@ -115,15 +116,15 @@ KDevelop::ContextMenuExtension OpenWithPlugin::contextMenuExtension( KDevelop::C
}
// Now setup a menu with actions for each part and app
KMenu* menu = new KMenu( i18n("Open With" ) );
QMenu* menu = new QMenu( i18n("Open With" ) );
menu->setIcon( QIcon::fromTheme( "document-open" ) );
if (!partActions.isEmpty()) {
menu->addTitle(i18n("Embedded Editors"));
menu->addSection(i18n("Embedded Editors"));
menu->addActions( partActions );
}
if (!appActions.isEmpty()) {
menu->addTitle(i18n("External Applications"));
menu->addSection(i18n("External Applications"));
menu->addActions( appActions );
}
......
......@@ -31,8 +31,6 @@
#include <KLocalizedString>
#include <kdebug.h>
#include <kicon.h>
#include <kmenu.h>
#include <project/projectmodel.h>
#include <interfaces/iproject.h>
......@@ -45,6 +43,7 @@
#include "ui_projectbuildsetwidget.h"
#include <QHeaderView>
#include <QMenu>
#include <interfaces/contextmenuextension.h>
#include <interfaces/context.h>
#include <interfaces/iplugincontroller.h>
......@@ -144,7 +143,7 @@ void ProjectBuildSetWidget::showContextMenu( const QPoint& p )
}
KMenu m;
QMenu m;
m.setTitle( i18n("Build Set") );
m.addAction( QIcon::fromTheme("list-remove"), i18n( "Remove From Build Set" ), this, SLOT(removeItems()) );
......
......@@ -28,11 +28,11 @@
#include <QApplication>
#include <QAbstractProxyModel>
#include <QItemDelegate>
#include <QMenu>
#include <kxmlguiwindow.h>
#include <kglobalsettings.h>
#include <kaction.h>
#include <kmenu.h>
#include <kdebug.h>
#include <kurl.h>
#include <KLocalizedString>
......@@ -154,7 +154,7 @@ void ProjectTreeView::dropEvent(QDropEvent* event)
{
if (ProjectFolderItem *folder = destItem->folder())
{
KMenu dropMenu(this);
QMenu dropMenu(this);
QString seq = QKeySequence( Qt::ShiftModifier ).toString();
seq.chop(1); // chop superfluous '+'
......@@ -219,7 +219,7 @@ void ProjectTreeView::dropEvent(QDropEvent* event)
}
else if (destItem->target() && destItem->project()->buildSystemManager())
{
KMenu dropMenu(this);
QMenu dropMenu(this);
QString seq = QKeySequence( Qt::ControlModifier ).toString();
seq.chop(1);
......@@ -313,7 +313,7 @@ void ProjectTreeView::popupContextMenu( const QPoint &pos )
m_ctxProject = 0;
}
KMenu menu( this );
QMenu menu( this );
KDevelop::ProjectItemContext context(itemlist);
QList<ContextMenuExtension> extensions = ICore::self()->pluginController()->queryPluginsForContextMenuExtensions( &context );
......
......@@ -35,7 +35,6 @@
#include <QClipboard>
#include <QWidgetAction>
#include <QSortFilterProxyModel>
#include <kmenu.h>
#include <kaction.h>
#include <kdebug.h>
#include <ktoggleaction.h>
......
......@@ -23,7 +23,7 @@
#include <KActionCollection>
#include <interfaces/iprojectcontroller.h>
#include <QDebug>
#include <KMenuBar>
#include <QMenuBar>
#include <qdesktopservices.h>
#include <sublime/area.h>
#include <sublime/view.h>
......
......@@ -24,8 +24,8 @@
#include <QtCore/QAbstractItemModel>
#include "projectexport.h"
#include <KDE/KUrl>
#include <KDE/KSharedConfig>
#include <KUrl>
#include <KSharedConfig>
template<typename T1,typename T2> struct QPair;
template<typename T> class QList;
......
......@@ -27,12 +27,12 @@
#include <interfaces/iuicontroller.h>
#include <KLocalizedString>
#include <KMenuBar>
#include <QMenu>
#include <QToolButton>
#include <QHBoxLayout>
#include <QLabel>
#include <QMenuBar>
#include <QEvent>
using namespace KDevelop;
......
......@@ -26,12 +26,12 @@
#include <QtCore/QMetaEnum>
#include <KDE/KLocale>
#include <KDE/KDebug>
#include <KDE/KActionCollection>
#include <KDE/KAction>
#include <KDE/KParts/Part>
#include <KDE/KParts/PartManager>
#include <KLocale>
#include <KDebug>
#include <KActionCollection>
#include <KAction>
#include <KParts/Part>
#include <KParts/PartManager>
#include <KTextEditor/Document>
#include <KTextEditor/MarkInterface>
......
......@@ -27,7 +27,7 @@
#include <QtCore/QVariantList>
#include <QPointer>
#include <KDE/KXMLGUIClient>
#include <KXMLGUIClient>
#include <KTextEditor/MarkInterface>
......
......@@ -30,10 +30,8 @@ Boston, MA 02110-1301, USA.
#include <QMenuBar>
#include <QtDBus/QDBusConnection>
#include <KDE/KApplication>
#include <KDE/KActionCollection>
#include <kmenu.h>
#include <kglobal.h>
#include <KApplication>
#include <KActionCollection>
#include <KLocalizedString>
#include <ktemporaryfile.h>
#include <kactioncollection.h>
......@@ -44,7 +42,6 @@ Boston, MA 02110-1301, USA.
#include <kxmlguifactory.h>
#include <ktoggleaction.h>
#include <KWindowSystem>
#include <KMenuBar>
#include <sublime/area.h>
#include "shellextension.h"
......@@ -362,7 +359,7 @@ void MainWindow::showErrorMessage(const QString& message, int timeout)
d->showErrorMessage(message, timeout);
}
void MainWindow::tabContextMenuRequested(Sublime::View* view, KMenu* menu)
void MainWindow::tabContextMenuRequested(Sublime::View* view, QMenu* menu)
{
Sublime::MainWindow::tabContextMenuRequested(view, menu);
d->tabContextMenuRequested(view, menu);
......
......@@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA.
#ifndef KDEVPLATFORM_MAINWINDOW_H
#define KDEVPLATFORM_MAINWINDOW_H
#include <KDE/KXmlGuiWindow>
#include <KXmlGuiWindow>
#include <sublime/mainwindow.h>
......@@ -85,7 +85,7 @@ protected:
protected Q_SLOTS:
virtual void tabContextMenuRequested(Sublime::View* , KMenu* );
virtual void tabContextMenuRequested(Sublime::View* , QMenu* );
virtual void tabToolTipRequested(Sublime::View* view, Sublime::Container* container, int tab);
virtual void dockBarContextMenuRequested(Qt::DockWidgetArea, const QPoint&);
......
......@@ -24,8 +24,8 @@ Boston, MA 02110-1301, USA.
#include <QApplication>
#include <QBoxLayout>
#include <QLabel>
#include <QMenu>
#include <kmenu.h>
#include <kdebug.h>
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
......@@ -341,7 +341,7 @@ void MainWindowPrivate::showErrorMessage(QString message, int timeout)
m_statusBar->showErrorMessage(message, timeout);
}
void MainWindowPrivate::tabContextMenuRequested(Sublime::View* view, KMenu* menu)
void MainWindowPrivate::tabContextMenuRequested(Sublime::View* view, QMenu* menu)
{
m_tabView = view;
......@@ -401,8 +401,8 @@ void MainWindowPrivate::tabToolTipRequested(Sublime::View* view, Sublime::Contai
void MainWindowPrivate::dockBarContextMenuRequested(Qt::DockWidgetArea area, const QPoint& position)
{
KMenu menu;
menu.addTitle(QIcon::fromTheme("window-new"), i18n("Add Tool View"));
QMenu menu;
menu.addSection(QIcon::fromTheme("window-new"), i18n("Add Tool View"));
QMap<IToolViewFactory*, Sublime::ToolDocument*> factories =
Core::self()->uiControllerInternal()->factoryDocuments();
QMap<QAction*, IToolViewFactory*> actionToFactory;
......
......@@ -29,7 +29,7 @@ Boston, MA 02110-1301, USA.
#include <language/util/navigationtooltip.h>
class KActionCollection;
class KMenu;
class QMenu;
namespace Sublime {
class View;
......@@ -63,7 +63,7 @@ public:
void setupStatusBar();
void registerStatus(QObject*);
void tabContextMenuRequested(Sublime::View *view, KMenu* menu);
void tabContextMenuRequested(Sublime::View *view, QMenu* menu);
void tabToolTipRequested(Sublime::View* view, Sublime::Container* container, int tab);
void dockBarContextMenuRequested(Qt::DockWidgetArea area, const QPoint& position);
......
......@@ -42,7 +42,6 @@ Boston, MA 02110-1301, USA.
#include <kstandarddirs.h>
#include <kaction.h>
#include <kxmlguifactory.h>
#include <kmenu.h>
#include <interfaces/contextmenuextension.h>
#include <interfaces/iplugin.h>
......
......@@ -27,8 +27,8 @@ Boston, MA 02110-1301, USA.
#include <QtCore/QHash>
#include <KDE/KUrl>
#include <KDE/KPluginInfo>
#include <KUrl>
#include <KPluginInfo>
#include <interfaces/iplugincontroller.h>
......
......@@ -21,16 +21,17 @@ Boston, MA 02110-1301, USA.
#include "runcontroller.h"
#include <QApplication>
#include <QMenu>
#include <QStandardItemModel>
#include <QPalette>
#include <KDE/KSelectAction>
#include <KDE/KActionMenu>
#include <KDE/KActionCollection>
#include <KDE/KMessageBox>
#include <KDE/KLocale>
#include <KDE/KDebug>
#include <KDE/KColorScheme>
#include <KSelectAction>
#include <KActionMenu>
#include <KActionCollection>
#include <KMessageBox>
#include <KLocale>
#include <KDebug>
#include <KColorScheme>
#include <kdialogjobuidelegate.h>
#include <interfaces/iproject.h>
......@@ -56,7 +57,6 @@ Boston, MA 02110-1301, USA.
#include <interfaces/contextmenuextension.h>
#include <interfaces/context.h>
#include <sublime/area.h>
#include <kmenu.h>
using namespace KDevelop;
......
......@@ -30,8 +30,8 @@ Boston, MA 02110-1301, USA.
#include <QMimeType>
#include <kxmlguiclient.h>
#include <KDE/KConfigGroup>
#include <KDE/KPluginInfo>
#include <KConfigGroup>
#include <KPluginInfo>
#include <KUrl>
#include "shellexport.h"
......
......@@ -27,8 +27,8 @@
#include <QLabel>
#include <QtCore/QSignalMapper>
#include <KDE/KColorScheme>
#include <KDE/KDebug>
#include <KColorScheme>
#include <KDebug>
#include <KSqueezedTextLabel>
#include <interfaces/istatus.h>
......@@ -44,7 +44,7 @@ namespace KDevelop
{
StatusBar::StatusBar(QWidget* parent)
: KStatusBar(parent)
: QStatusBar(parent)
, m_timer(new QTimer(this))
, m_currentView(0)
, m_errorRemovalMapper(new QSignalMapper(this))
......@@ -83,14 +83,14 @@ void StatusBar::viewChanged(Sublime::View* view)
if (view) {
connect(view, SIGNAL(statusChanged(Sublime::View*)), this, SLOT(viewStatusChanged(Sublime::View*)));
changeItem(view->viewStatus(), 0);
QStatusBar::showMessage(view->viewStatus(), 0);
}
}
void StatusBar::viewStatusChanged(Sublime::View* view)
{