Commit eb7556ba authored by Dominik Haumann's avatar Dominik Haumann

Merge branch 'master' into revive-externaltools-plugin

parents c6d5f54a 231d52d6
# Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
#
# You may use this file under the terms of the 3-clause BSD license.
# See the file LICENSE from this package for details.
# This is the clang-format configuration style to be used by Qt,
# based on the rules from https://wiki.qt.io/Qt_Coding_Style and
# https://wiki.qt.io/Coding_Conventions
---
# Webkit style was loosely based on the Qt style
BasedOnStyle: WebKit
Standard: Cpp11
# Column width is limited to 100 in accordance with Qt Coding Style.
# https://wiki.qt.io/Qt_Coding_Style
# Note that this may be changed at some point in the future.
ColumnLimit: 100
# How much weight do extra characters after the line length limit have.
# PenaltyExcessCharacter: 4
# Disable reflow of qdoc comments: indentation rules are different.
# Translation comments are also excluded.
CommentPragmas: "^!|^:"
# We want a space between the type and the star for pointer types.
PointerBindsToType: false
# We use template< without space.
SpaceAfterTemplateKeyword: false
# We want to break before the operators, but not before a '='.
BreakBeforeBinaryOperators: NonAssignment
# Braces are usually attached, but not after functions or class declarations.
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
# When constructor initializers do not fit on one line, put them each on a new line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Indent initializers by 4 spaces
ConstructorInitializerIndentWidth: 4
# Indent width for line continuations.
ContinuationIndentWidth: 8
# No indentation for namespaces.
NamespaceIndentation: None
# Horizontally align arguments after an open bracket.
# The coding style does not specify the following, but this is what gives
# results closest to the existing code.
AlignAfterOpenBracket: true
AlwaysBreakTemplateDeclarations: true
# Ideally we should also allow less short function in a single line, but
# clang-format does not handle that.
AllowShortFunctionsOnASingleLine: Inline
# The coding style specifies some include order categories, but also tells to
# separate categories with an empty line. It does not specify the order within
# the categories. Since the SortInclude feature of clang-format does not
# re-order includes separated by empty lines, the feature is not used.
SortIncludes: false
# macros for which the opening brace stays attached.
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
# Break constructor initializers before the colon and after the commas.
BreakConstructorInitializers: BeforeColon
# general
build
/build*/
*.rej
*.orig
*.out
CMakeLists.txt.user*
# kate
*~
......
# minimal requirements
cmake_minimum_required (VERSION 3.0 FATAL_ERROR)
# 3.1 is required for `target_sources`.
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
# Kate project
project (kate)
project(kate)
set (QT_MIN_VERSION "5.4.0")
set(QT_MIN_VERSION "5.4.0")
set(KF5_DEP_VERSION "5.40.0")
# KDE Application Version, managed by release script
set (KDE_APPLICATIONS_VERSION_MAJOR "19")
set (KDE_APPLICATIONS_VERSION_MINOR "07")
set (KDE_APPLICATIONS_VERSION_MICRO "70")
set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
# KDE Applications version, managed by release script.
set(KDE_APPLICATIONS_VERSION_MAJOR "19")
set(KDE_APPLICATIONS_VERSION_MINOR "11")
set(KDE_APPLICATIONS_VERSION_MICRO "70")
set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
# we need some parts of the ECM CMake helpers
find_package (ECM ${KF5_DEP_VERSION} REQUIRED NO_MODULE)
set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMMarkNonGuiExecutable)
include(ECMGenerateHeaders)
include(ECMAddAppIcon)
include(GenerateExportHeader)
# We need some parts of the ECM CMake helpers.
find_package(ECM ${KF5_DEP_VERSION} QUIET REQUIRED NO_MODULE)
include(CMakePackageConfigHelpers)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include (CheckFunctionExists)
# We append to the module path so modules can be overriden from the command line.
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
# Allow adding Qt resource files with `add_executable` or `target_sources` instead of
# `qt5_add_resources`. See https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html#autorcc.
set(CMAKE_AUTORCC ON)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core DBus Widgets Sql)
if(BUILD_TESTING)
find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED)
endif()
# Load the frameworks we need
find_package(KF5 "${KF5_DEP_VERSION}" REQUIRED COMPONENTS
Config
Crash
I18n
JobWidgets
KIO
Parts
TextEditor
WindowSystem
XmlGui
IconThemes
)
# some optional deps, to make compiling on some OSes easier
find_package(KF5 "${KF5_DEP_VERSION}" COMPONENTS
Activities
DocTools
)
if (KF5Activities_FOUND)
add_definitions(-DKActivities_FOUND)
endif ()
# config.h
check_function_exists (ctermid HAVE_CTERMID)
configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# let our config.h be found first in any case
include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR})
# kwrite
ecm_optional_add_subdirectory (kwrite)
# kate application
ecm_optional_add_subdirectory (kate)
include(ECMOptionalAddSubdirectory)
include(ECMAddAppIcon)
include(ECMInstallIcons)
# addons, e.g. kate plugins, plasma applets, ...
ecm_optional_add_subdirectory (addons)
include(FeatureSummary)
# docs, if doc tools around
if (KF5DocTools_FOUND)
ecm_optional_add_subdirectory (doc)
endif ()
ecm_optional_add_subdirectory(addons)
ecm_optional_add_subdirectory(kwrite)
ecm_optional_add_subdirectory(kate)
ecm_optional_add_subdirectory(doc)
# tell about our features (and what is missing)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
# detect additional frameworks
find_package(KF5 "${KF5_DEP_VERSION}" OPTIONAL_COMPONENTS Wallet Plasma Service ItemModels ThreadWeaver NewStuff IconThemes GuiAddons)
set_package_properties(KF5Wallet PROPERTIES PURPOSE "Required to build the katesql addon")
set_package_properties(KF5Plasma PROPERTIES PURPOSE "Required to build the sessionapplet addon")
set_package_properties(KF5Service PROPERTIES PURPOSE "Required to build the sessionapplet addon")
set_package_properties(KF5ItemModels PROPERTIES PURPOSE "Required to build the project, konsole addon")
set_package_properties(KF5ThreadWeaver PROPERTIES PURPOSE "Required to build the project addon")
set_package_properties(KF5NewStuff PROPERTIES PURPOSE "Required to build the snippets and project addons")
# document switcher
ecm_optional_add_subdirectory (filetree)
# search in open documents and files
ecm_optional_add_subdirectory (search)
# ALT+Tab like tab switcher
ecm_optional_add_subdirectory (tabswitcher)
# ctags
ecm_optional_add_subdirectory (kate-ctags)
# backtrace
ecm_optional_add_subdirectory (backtracebrowser)
# file browser
ecm_optional_add_subdirectory (filebrowser)
# xml completion
ecm_optional_add_subdirectory (xmltools)
# XML Validation plugin
ecm_optional_add_subdirectory (xmlcheck)
# open header matching to current file
ecm_optional_add_subdirectory (openheader)
# debugger plugin, needs windows love, guarded until ported to win32
if (NOT WIN32)
ecm_optional_add_subdirectory (gdbplugin)
endif ()
# list symbols and functions in a file
ecm_optional_add_subdirectory (symbolviewer)
# replicode integration
ecm_optional_add_subdirectory (replicode)
# pipe text through some external command
ecm_optional_add_subdirectory (textfilter)
if(NOT KF5TextEditor_VERSION VERSION_LESS 5.57.0)
# external tools
ecm_optional_add_subdirectory (externaltools)
endif()
# Rust complection plugin
ecm_optional_add_subdirectory (rustcompletion)
# D completion plugin
ecm_optional_add_subdirectory (lumen)
# build plugin
ecm_optional_add_subdirectory (katebuild-plugin)
# close document except this one (or similar)
ecm_optional_add_subdirectory (close-except-like)
if(KF5Wallet_FOUND)
# kate sql
ecm_optional_add_subdirectory (katesql)
endif()
if(KF5NewStuff_FOUND)
# snippets
ecm_optional_add_subdirectory (snippets)
endif()
# live preview of sources in target format
ecm_optional_add_subdirectory (preview)
# terminal tool view
if(KF5Service_FOUND AND NOT WIN32)
ecm_optional_add_subdirectory (konsole)
endif()
if(KF5ItemModels_FOUND AND KF5ThreadWeaver_FOUND AND KF5NewStuff_FOUND)
# small & smart project manager
ecm_optional_add_subdirectory (project)
endif()
if (KF5Plasma_FOUND AND KF5Service_FOUND)
ecm_optional_add_subdirectory (sessionapplet)
endif()
# Most plugins will need to link against KF5TextEditor to have access to its plugin interface.
find_package(KF5TextEditor QUIET REQUIRED)
ecm_optional_add_subdirectory(backtracebrowser)
ecm_optional_add_subdirectory(close-except-like) # Close all documents except this one (or similar).
ecm_optional_add_subdirectory(externaltools)
ecm_optional_add_subdirectory(filebrowser)
ecm_optional_add_subdirectory(filetree)
ecm_optional_add_subdirectory(gdbplugin)
ecm_optional_add_subdirectory(kate-ctags)
ecm_optional_add_subdirectory(katebuild-plugin)
ecm_optional_add_subdirectory(katesql)
ecm_optional_add_subdirectory(konsole)
ecm_optional_add_subdirectory(lspclient) # Language Server Protocol (LSP) client plugin.
ecm_optional_add_subdirectory(lumen) # D completion
ecm_optional_add_subdirectory(openheader) # Open header matching to current file.
ecm_optional_add_subdirectory(preview) # Live preview of sources in target format.
ecm_optional_add_subdirectory(project) # Small & smart project manager.
ecm_optional_add_subdirectory(replicode)
ecm_optional_add_subdirectory(rustcompletion)
ecm_optional_add_subdirectory(search)
ecm_optional_add_subdirectory(sessionapplet)
ecm_optional_add_subdirectory(snippets)
ecm_optional_add_subdirectory(symbolviewer) # List symbols and functions in a file.
ecm_optional_add_subdirectory(tabswitcher) # ALT+Tab like tab switcher.
ecm_optional_add_subdirectory(textfilter) # Pipe text through some external command.
ecm_optional_add_subdirectory(xmlcheck) # XML Validation plugin
ecm_optional_add_subdirectory(xmltools) # XML completion
########### next target ###############
add_definitions(-DTRANSLATION_DOMAIN=\"katebacktracebrowserplugin\")
add_library(katebacktracebrowserplugin MODULE "")
target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN="katebacktracebrowserplugin")
target_link_libraries(katebacktracebrowserplugin PRIVATE KF5::TextEditor)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
ki18n_wrap_ui(UI_SOURCES btbrowserwidget.ui btconfigwidget.ui)
target_sources(katebacktracebrowserplugin PRIVATE ${UI_SOURCES})
set(katebacktracebrowserplugin_PART_SRCS
target_sources(
katebacktracebrowserplugin
PRIVATE
katebacktracebrowser.cpp
btparser.cpp
btfileindexer.cpp
btdatabase.cpp
)
set(katebacktracebrowserplugin_PART_UI
btbrowserwidget.ui
btconfigwidget.ui
)
ki18n_wrap_ui(katebacktracebrowserplugin_PART_SRCS ${katebacktracebrowserplugin_PART_UI} )
add_library(katebacktracebrowserplugin MODULE ${katebacktracebrowserplugin_PART_SRCS})
# we compile in the .desktop file
kcoreaddons_desktop_to_json (katebacktracebrowserplugin katebacktracebrowserplugin.desktop)
target_link_libraries(katebacktracebrowserplugin
KF5::TextEditor
KF5::I18n
)
########### install files ###############
install( TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor )
kcoreaddons_desktop_to_json(katebacktracebrowserplugin katebacktracebrowserplugin.desktop)
install(TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
############# unit tests ################
if (BUILD_TESTING)
add_subdirectory(autotests)
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
include(ECMMarkAsTest)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
add_executable(btbrowser_test "")
target_include_directories(btbrowser_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
find_package(Qt5Test QUIET REQUIRED)
target_link_libraries(
btbrowser_test
PRIVATE
Qt5::Widgets
Qt5::Test
)
target_sources(btbrowser_test PRIVATE
btbrowsertest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../btparser.cpp
)
# Plugin Kate Backtrace Browser
set(BtBrowserSrc btbrowsertest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../btparser.cpp)
add_executable(btbrowser_test ${BtBrowserSrc})
add_test(NAME plugin-btbrowser_test COMMAND btbrowser_test)
target_link_libraries(btbrowser_test kdeinit_kate Qt5::Test)
ecm_mark_as_test(btbrowser_test)
......@@ -23,6 +23,7 @@ Name[ga]=Brabhsálaí Cúl-Loirg
Name[gl]=Navegador de trazados inversos
Name[hu]=Visszakövetési böngésző
Name[ia]=Navigator de tracia de retro
Name[id]=Penelusur Backtrace
Name[is]=Afturrakningarvafri
Name[it]=Navigatore di backtrace
Name[ja]=バックトレースブラウザ
......
kate: space-indent on; tab-width 4; indent-width 4; replace-tabs on; hl C++/Qt4;
project(katecloseexceptplugin)
add_definitions(-DTRANSLATION_DOMAIN=\"katecloseexceptplugin\")
set(VERSION_MAJOR 0)
set(VERSION_MINOR 3)
set(VERSION_PATCH 5)
set(VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
find_package(KF5IconThemes QUIET)
set_package_properties(KF5IconThemes PROPERTIES PURPOSE "Required to build the close-except-like addon")
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
if(NOT KF5IconThemes_FOUND)
return()
endif()
set(KATE_CLOSE_EXCEPT_PLUGIN_SOURCES
close_confirm_dialog.cpp
close_except_plugin.cpp
)
add_library(katecloseexceptplugin MODULE "")
target_compile_definitions(katecloseexceptplugin PRIVATE TRANSLATION_DOMAIN="katecloseexceptplugin")
set(KATE_CLOSE_EXCEPT_PLUGIN_UI
close_confirm_dialog.ui
target_link_libraries(
katecloseexceptplugin
PRIVATE
KF5::TextEditor
KF5::IconThemes
)
ki18n_wrap_ui(KATE_CLOSE_EXCEPT_PLUGIN_SOURCES ${KATE_CLOSE_EXCEPT_PLUGIN_UI})
# resource for ui file and stuff
qt5_add_resources(KATE_CLOSE_EXCEPT_PLUGIN_SOURCES plugin.qrc)
ki18n_wrap_ui(UI_SOURCES close_confirm_dialog.ui)
target_sources(katecloseexceptplugin PRIVATE ${UI_SOURCES})
add_library(katecloseexceptplugin MODULE ${KATE_CLOSE_EXCEPT_PLUGIN_SOURCES})
target_sources(
katecloseexceptplugin
PRIVATE
close_confirm_dialog.cpp
close_except_plugin.cpp
plugin.qrc
)
# we compile in the .desktop file
kcoreaddons_desktop_to_json(katecloseexceptplugin katecloseexceptplugin.desktop)
target_link_libraries(katecloseexceptplugin
KF5::TextEditor
KF5::Parts
KF5::I18n
KF5::IconThemes
)
configure_file(config.h.in config.h)
install(TARGETS katecloseexceptplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
......@@ -82,9 +82,9 @@ CloseConfirmDialog::CloseConfirmDialog(
m_docs_tree->setSelectionMode(QAbstractItemView::SingleSelection);
m_docs_tree->setRootIsDecorated(false);
for (int i = 0; i < m_docs.size(); i++)
for (auto& doc : qAsConst(m_docs))
{
new KateDocItem(m_docs[i], m_docs_tree);
new KateDocItem(doc, m_docs_tree);
}
m_docs_tree->header()->setStretchLastSection(false);
m_docs_tree->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
......
......@@ -23,7 +23,6 @@
*/
// Project specific includes
#include "config.h"
#include "close_except_plugin.h"
#include "close_confirm_dialog.h"
......@@ -42,18 +41,6 @@
#include <KXMLGUIFactory>
K_PLUGIN_FACTORY_WITH_JSON(CloseExceptPluginFactory, "katecloseexceptplugin.json", registerPlugin<kate::CloseExceptPlugin>();)
/*K_EXPORT_PLUGIN(
CloseExceptPluginFactory(
KAboutData(
"katecloseexceptplugin"
, "katecloseexceptplugin"
, ki18n("Close Except/Like Plugin")
, PLUGIN_VERSION
, ki18n("Close all documents started from specified path")
, KAboutData::License_LGPL_V3
)
)
)*/
namespace kate {
//BEGIN CloseExceptPlugin
......
/**
* \file
*
* \brief Class \c kate::config (interface)
*
* Copyright (C) 2012 Alex Turbov <i.zaufi@gmail.com>
*
* \date Thu Mar 8 08:19:57 MSK 2012 -- Initial design
*
* \attention DO NOT EDIT THIS FILE! IT WAS GENERATED BY CMAKE.
*/
/*
* KateCloseExceptPlugin 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, either version 3 of the License, or
* (at your option) any later version.
*
* KateCloseExceptPlugin 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.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SRC__CONFIG_H__
# define __SRC__CONFIG_H__
# define PLUGIN_VERSION "@VERSION_STRING@"
#endif // __SRC__CONFIG_H__
// kate: hl c++;
if(KF5TextEditor_VERSION VERSION_LESS 5.57.0)
return()
endif()
project(externaltoolsplugin)
add_definitions(-DTRANSLATION_DOMAIN=\"kateexternaltoolsplugin\")
......
project(katefilebrowserplugin)
add_definitions(-DTRANSLATION_DOMAIN=\"katefilebrowserplugin\")
find_package(KF5KIO QUIET)
set_package_properties(KF5KIO PROPERTIES PURPOSE "Required to build the filebrowser addon")
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
if(NOT KF5KIO_FOUND)
return()
endif()
set(katefilebrowserplugin_PART_SRCS
add_library(katefilebrowserplugin MODULE "")
target_compile_definitions(katefilebrowserplugin PRIVATE TRANSLATION_DOMAIN="katefilebrowserplugin")
target_link_libraries(
katefilebrowserplugin
PRIVATE
KF5::TextEditor
KF5::KIOFileWidgets
)
target_sources(
katefilebrowserplugin
PRIVATE
katefilebrowserplugin.cpp
katefilebrowserconfig.cpp
katefilebrowser.cpp
katebookmarkhandler.cpp
)
add_library(katefilebrowserplugin MODULE ${katefilebrowserplugin_PART_SRCS})
# we compile in the .desktop file
kcoreaddons_desktop_to_json (katefilebrowserplugin katefilebrowserplugin.desktop)
target_link_libraries(katefilebrowserplugin KF5::TextEditor KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets KF5::I18n)
install(TARGETS katefilebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor )
kcoreaddons_desktop_to_json(katefilebrowserplugin katefilebrowserplugin.desktop)
install(TARGETS katefilebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor)
......@@ -149,24 +149,36 @@ void KateFileBrowserConfigPage::init()
l << QStringLiteral("back") << QStringLiteral("forward") << QStringLiteral("bookmarks") << QStringLiteral("sync_dir") << QStringLiteral("configure");
// actions from diroperator + two of our own
QStringList allActions;
allActions << QStringLiteral("up") << QStringLiteral("back") << QStringLiteral("forward") << QStringLiteral("home")
<< QStringLiteral("reload") << QStringLiteral("mkdir") << QStringLiteral("delete")
<< QStringLiteral("short view") << QStringLiteral("detailed view")
<< QStringLiteral("tree view") << QStringLiteral("detailed tree view")
<< QStringLiteral("show hidden") /*<< QStringLiteral("view menu") << QStringLiteral("properties")*/
<< QStringLiteral("bookmarks") << QStringLiteral("sync_dir") << QStringLiteral("configure");
const QStringList allActions{
QStringLiteral("up"),
QStringLiteral("back"),
QStringLiteral("forward"),
QStringLiteral("home"),
QStringLiteral("reload"),
QStringLiteral("mkdir"),
QStringLiteral("delete"),
QStringLiteral("short view"),
QStringLiteral("detailed view"),
QStringLiteral("tree view"),
QStringLiteral("detailed tree view"),
QStringLiteral("show hidden"),
//QStringLiteral("view menu"),
//QStringLiteral("properties"),
QStringLiteral("bookmarks"),
QStringLiteral("sync_dir"),
QStringLiteral("configure")};
QRegularExpression re(QStringLiteral("&(?=[^&])"));
QAction *ac = nullptr;
QListWidget *lb;
for ( QStringList::Iterator it = allActions.begin(); it != allActions.end(); ++it )
for (const auto& actionName : allActions)
{
lb = l.contains( *it ) ? acSel->selectedListWidget() : acSel->availableListWidget();
lb = l.contains( actionName ) ? acSel->selectedListWidget() : acSel->availableListWidget();
if ( *it == QStringLiteral ("bookmarks") || *it == QStringLiteral ("sync_dir") || *it == QStringLiteral ("configure") )
ac = fileBrowser->actionCollection()->action( *it );
if ( actionName == QStringLiteral ("bookmarks") || actionName == QStringLiteral ("sync_dir") || actionName == QStringLiteral ("configure") )
ac = fileBrowser->actionCollection()->action( actionName );
else
ac = fileBrowser->dirOperator()->actionCollection()->action( *it );
ac = fileBrowser->dirOperator()->actionCollection()->action( actionName );
if ( ac )
{
......@@ -177,7 +189,7 @@ void KateFileBrowserConfigPage::init()
// avoid extraction here and let it be sourced from kdelibs.
#define i18ncX i18nc
text = i18ncX( "@item:intable Action name in toolbar editor", "%1", text );
new ActionLBItem( lb, ac->icon(), text, *it );
new ActionLBItem( lb, ac->icon(), text, actionName );
}
}
}
......
......@@ -15,6 +15,7 @@ Name[eu]=Fitxategi-sistemaren arakatzailea
Name[fi]=Tiedostojärjestelmäselain
Name[fr]=Explorateur du système de fichiers
Name[gl]=Navegador do sistema de ficheiros
Name[id]=Penelusur Sistem File
Name[it]=Selettore dei file
Name[ko]=파일 시스템 탐색기
Name[nl]=Bestandssysteembrowser
......
add_definitions(-DTRANSLATION_DOMAIN=\"katefiletree\")
project(katefiletreeplugin)
find_package(KF5GuiAddons QUIET)
set_package_properties(KF5GuiAddons PROPERTIES PURPOSE "Required to build the katefiletree addon")
set(katefiletree_PART_SRCS katefiletree.cpp katefiletreemodel.cpp katefiletreeproxymodel.cpp )
set(katefiletreeplugin_PART_SRCS katefiletreeplugin.cpp katefiletreeconfigpage.cpp katefiletreepluginsettings.cpp )
if(NOT KF5GuiAddons_FOUND)
return()
endif()
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )