Commit e02a021d authored by Laurent Montel's avatar Laurent Montel 😁

Use a better richtexteditor

parent 5ba2200b
......@@ -8,6 +8,11 @@ endif ()
#add_definitions( -DQT_NO_CAST_TO_ASCII )
include_directories(
${CMAKE_SOURCE_DIR}/pimcommon
)
add_definitions( ${KDE4_ENABLE_EXCEPTIONS} )
add_definitions( -DGPGMEPP_ERR_SOURCE_DEFAULT=13 ) # 13 is GPG_ERR_SOURCE_KLEO, even if gpg-error's too old to know about
#parts of Boost don't build with the gcc pedantic option, so remove that option
......@@ -99,7 +104,7 @@ kde4_add_ui_files(libkleo_ui_common_SRCS
)
set(kleo_LIB_SRCS ${libkleo_core_SRCS} ${libkleo_ui_common_SRCS} ${libkleo_backend_qgpgme_SRCS})
set(kleo_LIB_LIBS ${KDE4_KDEUI_LIBS} ${QGPGME_LIBRARIES})
set(kleo_LIB_LIBS ${KDE4_KDEUI_LIBS} ${QGPGME_LIBRARIES} pimcommon)
if ( NOT KDEPIM_ONLY_KLEO )
set( kleo_LIB_SRCS ${kleo_LIB_SRCS} ${libkleo_backend_chiasmus_SRCS} ${libkleo_ui_SRCS})
set( kleo_LIB_LIBS ${kleo_LIB_LIBS} ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS})
......
......@@ -38,6 +38,8 @@
#include <gpgme++/signingresult.h>
#include <gpgme++/encryptionresult.h>
#include "pimcommon/texteditor/richtexteditor/richtexteditor.h"
#ifndef KDEPIM_ONLY_KLEO
# include <kfiledialog.h>
......@@ -83,7 +85,7 @@ static KGuiItem KGuiItem_showAuditLog() {
AuditLogViewer::AuditLogViewer( const QString & log, QWidget * parent, Qt::WindowFlags f )
: KDialog( parent, f ),
m_log( /* sic */ ),
m_textEdit( new KTextEdit( this ) )
m_textEdit( new PimCommon::RichTextEditorWidget( this ) )
{
setCaption( i18n("View GnuPG Audit Log") );
setButtons( Close
......@@ -166,9 +168,9 @@ void AuditLogViewer::slotUser1() {
#ifndef QT_NO_CLIPBOARD
void AuditLogViewer::slotUser2() {
m_textEdit->selectAll();
m_textEdit->copy();
m_textEdit->textCursor().clearSelection();
m_textEdit->editor()->selectAll();
m_textEdit->editor()->copy();
m_textEdit->editor()->textCursor().clearSelection();
}
#endif // QT_NO_CLIPBOARD
......
......@@ -34,6 +34,7 @@
#define __KLEO_UI_MESSAGEBOX_P_H__
#include <KDialog>
#include "pimcommon/texteditor/richtexteditor/richtexteditorwidget.h"
class QString;
class KTextEdit;
......@@ -63,7 +64,7 @@ namespace Private {
void readConfig();
QString m_log;
KTextEdit * m_textEdit;
PimCommon::RichTextEditorWidget *m_textEdit;
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment