Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE PIM Add-ons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
KDE PIM Add-ons
Commits
4ae4d6a4
Commit
4ae4d6a4
authored
Apr 27, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Bug 362100 - No mail headers if kdepim-addons is not installed
parent
c2765de0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
0 additions
and
428 deletions
+0
-428
plugins/messageviewerheaderplugins/CMakeLists.txt
plugins/messageviewerheaderplugins/CMakeLists.txt
+0
-1
plugins/messageviewerheaderplugins/autotests/CMakeLists.txt
plugins/messageviewerheaderplugins/autotests/CMakeLists.txt
+0
-2
plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.cpp
...eaderplugins/autotests/standardsheaderstyleplugintest.cpp
+0
-55
plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.h
...rheaderplugins/autotests/standardsheaderstyleplugintest.h
+0
-35
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/CMakeLists.txt
...erheaderplugins/standardsheaderstyleplugin/CMakeLists.txt
+0
-16
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/messageviewer_standardsheaderstyleplugin.json
...styleplugin/messageviewer_standardsheaderstyleplugin.json
+0
-32
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.cpp
...ins/standardsheaderstyleplugin/standardheaderstrategy.cpp
+0
-36
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.h
...ugins/standardsheaderstyleplugin/standardheaderstrategy.h
+0
-57
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.cpp
...ndardsheaderstyleplugin/standardsheaderstyleinterface.cpp
+0
-49
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.h
...tandardsheaderstyleplugin/standardsheaderstyleinterface.h
+0
-39
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.cpp
...standardsheaderstyleplugin/standardsheaderstyleplugin.cpp
+0
-63
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.h
...s/standardsheaderstyleplugin/standardsheaderstyleplugin.h
+0
-43
No files found.
plugins/messageviewerheaderplugins/CMakeLists.txt
View file @
4ae4d6a4
...
...
@@ -6,7 +6,6 @@ add_subdirectory(enterpriseheaderstyleplugin)
add_subdirectory
(
fancyheaderstyleplugin
)
add_subdirectory
(
grantleeheaderstyleplugin
)
add_subdirectory
(
longheaderstyleplugin
)
add_subdirectory
(
standardsheaderstyleplugin
)
add_subdirectory
(
defaultgrantleeheaderstyleplugin
)
if
(
BUILD_TESTING
)
add_subdirectory
(
autotests
)
...
...
plugins/messageviewerheaderplugins/autotests/CMakeLists.txt
View file @
4ae4d6a4
...
...
@@ -34,6 +34,4 @@ add_messageviewer_header_unittest( grantleeheaderstyleplugintest.cpp "../grantle
add_messageviewer_header_unittest
(
longheaderstyleplugintest.cpp
"../longheaderstyleplugin/longheaderstyleplugin.cpp;../longheaderstyleplugin/longheaderstyleinterface.cpp"
)
add_messageviewer_header_unittest
(
standardsheaderstyleplugintest.cpp
"../standardsheaderstyleplugin/standardheaderstrategy.cpp;../standardsheaderstyleplugin/standardsheaderstyleplugin.cpp;../standardsheaderstyleplugin/standardsheaderstyleinterface.cpp"
)
add_messageviewer_header_class_unittest
(
headerstylepluginmanagertest.cpp
)
plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.cpp
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "standardsheaderstyleplugintest.h"
#include "../standardsheaderstyleplugin/standardsheaderstyleplugin.h"
#include "../standardsheaderstyleplugin/standardsheaderstyleinterface.h"
#include <QTest>
#include <KActionCollection>
#include <KActionMenu>
#include <QActionGroup>
StandardsHeaderStylePluginTest
::
StandardsHeaderStylePluginTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
StandardsHeaderStylePluginTest
::~
StandardsHeaderStylePluginTest
()
{
}
void
StandardsHeaderStylePluginTest
::
shouldHaveDefaultValue
()
{
MessageViewer
::
StandardsHeaderStylePlugin
plugin
;
QVERIFY
(
plugin
.
headerStyle
());
QVERIFY
(
plugin
.
headerStrategy
());
}
void
StandardsHeaderStylePluginTest
::
shouldCreateInterface
()
{
MessageViewer
::
StandardsHeaderStylePlugin
plugin
;
KActionMenu
*
menu
=
new
KActionMenu
(
this
);
QActionGroup
*
act
=
new
QActionGroup
(
this
);
MessageViewer
::
HeaderStyleInterface
*
interface
=
plugin
.
createView
(
menu
,
act
,
new
KActionCollection
(
this
));
QVERIFY
(
interface
);
QVERIFY
(
!
interface
->
action
().
isEmpty
());
}
QTEST_MAIN
(
StandardsHeaderStylePluginTest
)
plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.h
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef STANDARDSHEADERSTYLEPLUGINTEST_H
#define STANDARDSHEADERSTYLEPLUGINTEST_H
#include <QObject>
class
StandardsHeaderStylePluginTest
:
public
QObject
{
Q_OBJECT
public:
explicit
StandardsHeaderStylePluginTest
(
QObject
*
parent
=
Q_NULLPTR
);
~
StandardsHeaderStylePluginTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
void
shouldCreateInterface
();
};
#endif // STANDARDSHEADERSTYLEPLUGINTEST_H
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/CMakeLists.txt
deleted
100644 → 0
View file @
c2765de0
set
(
messageviewer_standardsheaderstyleplugin_SRCS
standardsheaderstyleplugin.cpp
standardsheaderstyleinterface.cpp
standardheaderstrategy.cpp
)
add_library
(
messageviewer_standardsheaderstyleplugin MODULE
${
messageviewer_standardsheaderstyleplugin_SRCS
}
)
target_link_libraries
(
messageviewer_standardsheaderstyleplugin
KF5::MessageViewer
KF5::XmlGui
KF5::GrantleeTheme
KF5::I18n
)
install
(
TARGETS messageviewer_standardsheaderstyleplugin DESTINATION
${
PLUGIN_INSTALL_DIR
}
/messageviewer
)
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/messageviewer_standardsheaderstyleplugin.json
deleted
100644 → 0
View file @
c2765de0
{
"KPlugin"
:
{
"Name"
:
"Standards Header Style"
,
"Name[ca@valencia]"
:
"Estil de capçalera estàndard"
,
"Name[ca]"
:
"Estil de capçalera estàndard"
,
"Name[de]"
:
"Vorspann-Design „Standard“"
,
"Name[es]"
:
"Estilo de encabezado estándar"
,
"Name[fi]"
:
"Vakio-otsaketyyli"
,
"Name[gl]"
:
"Estilo de cabeceira estándar"
,
"Name[it]"
:
"Stile con intestazioni standard"
,
"Name[nl]"
:
"Stijl met standaard headers"
,
"Name[pl]"
:
"Standardowe nagłówki"
,
"Name[pt]"
:
"Estilo de Cabeçalho-Padrão"
,
"Name[pt_BR]"
:
"Estilo de cabeçalho Padrão"
,
"Name[ru]"
:
"Стандартный стиль заголовков"
,
"Name[sk]"
:
"Štandardný štýl hlavičiek"
,
"Name[sl]"
:
"Slog z običajnimi glavami"
,
"Name[sr@ijekavian]"
:
"стандардни стил заглавља"
,
"Name[sr@ijekavianlatin]"
:
"standardni stil zaglavlja"
,
"Name[sr@latin]"
:
"standardni stil zaglavlja"
,
"Name[sr]"
:
"стандардни стил заглавља"
,
"Name[sv]"
:
"Vanlig rubrikstil"
,
"Name[uk]"
:
"Стандартний стиль заголовків"
,
"Name[x-test]"
:
"xxStandards Header Stylexx"
,
"Name[zh_CN]"
:
"标准信头风格"
,
"ServiceTypes"
:
[
"MessageViewerHeaderStyle/Plugin"
],
"Version"
:
"1.0"
},
"X-KDE-MessageViewer-Header-Order"
:
"4"
}
\ No newline at end of file
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.cpp
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "standardheaderstrategy.h"
using
namespace
MessageViewer
;
static
const
char
*
const
standardHeaders
[]
=
{
"subject"
,
"from"
,
"cc"
,
"bcc"
,
"to"
};
static
const
int
numStandardHeaders
=
sizeof
standardHeaders
/
sizeof
*
standardHeaders
;
StandardHeaderStrategy
::
StandardHeaderStrategy
()
:
HeaderStrategy
(),
mHeadersToDisplay
(
stringList
(
standardHeaders
,
numStandardHeaders
))
{
}
StandardHeaderStrategy
::~
StandardHeaderStrategy
()
{
}
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.h
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef STANDARDHEADERSTRATEGY_H
#define STANDARDHEADERSTRATEGY_H
#include <messageviewer/headerstrategy.h>
#include <QStringList>
namespace
MessageViewer
{
//
// StandardHeaderStrategy:
// BCC, CC, Date, From, Subject, To
//
class
StandardHeaderStrategy
:
public
HeaderStrategy
{
public:
StandardHeaderStrategy
();
~
StandardHeaderStrategy
();
public:
const
char
*
name
()
const
Q_DECL_OVERRIDE
{
return
"standard"
;
}
QStringList
headersToDisplay
()
const
Q_DECL_OVERRIDE
{
return
mHeadersToDisplay
;
}
DefaultPolicy
defaultPolicy
()
const
Q_DECL_OVERRIDE
{
return
Hide
;
}
private:
const
QStringList
mHeadersToDisplay
;
};
}
#endif // STANDARDHEADERSTRATEGY_H
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.cpp
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "standardsheaderstyleinterface.h"
#include <KToggleAction>
#include <KLocalizedString>
#include <KActionCollection>
using
namespace
MessageViewer
;
StandardsHeaderStyleInterface
::
StandardsHeaderStyleInterface
(
MessageViewer
::
HeaderStylePlugin
*
plugin
,
QObject
*
parent
)
:
MessageViewer
::
HeaderStyleInterface
(
plugin
,
parent
)
{
}
StandardsHeaderStyleInterface
::~
StandardsHeaderStyleInterface
()
{
}
void
StandardsHeaderStyleInterface
::
createAction
(
KActionMenu
*
menu
,
QActionGroup
*
actionGroup
,
KActionCollection
*
ac
)
{
KToggleAction
*
act
=
new
KToggleAction
(
i18nc
(
"View->headers->"
,
"&Standard Headers"
),
this
);
ac
->
addAction
(
QStringLiteral
(
"view_headers_standard"
),
act
);
connect
(
act
,
&
KToggleAction
::
triggered
,
this
,
&
StandardsHeaderStyleInterface
::
slotStyleChanged
);
addHelpTextAction
(
act
,
i18n
(
"Show standard list of message headers"
));
mAction
.
append
(
act
);
addActionToMenu
(
menu
,
actionGroup
);
}
void
StandardsHeaderStyleInterface
::
activateAction
()
{
mAction
.
at
(
0
)
->
setChecked
(
true
);
}
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.h
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef STANDARDSHEADERSTYLEINTERFACE_H
#define STANDARDSHEADERSTYLEINTERFACE_H
#include <messageviewer/headerstyleinterface.h>
namespace
MessageViewer
{
class
StandardsHeaderStyleInterface
:
public
MessageViewer
::
HeaderStyleInterface
{
Q_OBJECT
public:
explicit
StandardsHeaderStyleInterface
(
HeaderStylePlugin
*
plugin
,
QObject
*
parent
=
Q_NULLPTR
);
~
StandardsHeaderStyleInterface
();
void
createAction
(
KActionMenu
*
menu
,
QActionGroup
*
actionGroup
,
KActionCollection
*
ac
)
Q_DECL_OVERRIDE
;
void
activateAction
()
Q_DECL_OVERRIDE
;
};
}
#endif // STANDARDSHEADERSTYLEINTERFACE_H
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.cpp
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "standardsheaderstyleplugin.h"
#include "standardsheaderstyleinterface.h"
#include "standardheaderstrategy.h"
#include "messageviewer/plainheaderstyle.h"
#include <kpluginfactory.h>
using
namespace
MessageViewer
;
K_PLUGIN_FACTORY_WITH_JSON
(
MessageViewerStandardsHeaderStylePluginFactory
,
"messageviewer_standardsheaderstyleplugin.json"
,
registerPlugin
<
StandardsHeaderStylePlugin
>
();)
StandardsHeaderStylePlugin
::
StandardsHeaderStylePlugin
(
QObject
*
parent
,
const
QList
<
QVariant
>
&
)
:
MessageViewer
::
HeaderStylePlugin
(
parent
),
mHeaderStyle
(
new
PlainHeaderStyle
),
mHeaderStrategy
(
new
StandardHeaderStrategy
)
{
}
StandardsHeaderStylePlugin
::~
StandardsHeaderStylePlugin
()
{
}
HeaderStyle
*
StandardsHeaderStylePlugin
::
headerStyle
()
const
{
return
mHeaderStyle
;
}
HeaderStrategy
*
StandardsHeaderStylePlugin
::
headerStrategy
()
const
{
return
mHeaderStrategy
;
}
HeaderStyleInterface
*
StandardsHeaderStylePlugin
::
createView
(
KActionMenu
*
menu
,
QActionGroup
*
actionGroup
,
KActionCollection
*
ac
,
QObject
*
parent
)
{
MessageViewer
::
HeaderStyleInterface
*
view
=
new
MessageViewer
::
StandardsHeaderStyleInterface
(
this
,
parent
);
if
(
ac
)
{
view
->
createAction
(
menu
,
actionGroup
,
ac
);
}
return
view
;
}
QString
StandardsHeaderStylePlugin
::
name
()
const
{
return
QStringLiteral
(
"standards-header"
);
}
#include "standardsheaderstyleplugin.moc"
plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.h
deleted
100644 → 0
View file @
c2765de0
/*
Copyright (c) 2015-2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef STANDARDSHEADERSTYLEPLUGIN_H
#define STANDARDSHEADERSTYLEPLUGIN_H
#include "messageviewer/headerstyleplugin.h"
#include <QVariant>
namespace
MessageViewer
{
class
StandardsHeaderStylePlugin
:
public
MessageViewer
::
HeaderStylePlugin
{
Q_OBJECT
public:
explicit
StandardsHeaderStylePlugin
(
QObject
*
parent
=
Q_NULLPTR
,
const
QList
<
QVariant
>
&
=
QList
<
QVariant
>
());
~
StandardsHeaderStylePlugin
();
HeaderStyle
*
headerStyle
()
const
Q_DECL_OVERRIDE
;
HeaderStrategy
*
headerStrategy
()
const
Q_DECL_OVERRIDE
;
HeaderStyleInterface
*
createView
(
KActionMenu
*
menu
,
QActionGroup
*
actionGroup
,
KActionCollection
*
ac
,
QObject
*
parent
=
Q_NULLPTR
)
Q_DECL_OVERRIDE
;
QString
name
()
const
Q_DECL_OVERRIDE
;
private:
HeaderStyle
*
mHeaderStyle
;
HeaderStrategy
*
mHeaderStrategy
;
};
}
#endif // STANDARDSHEADERSTYLEPLUGIN_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment