mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-16 21:10:26 +00:00
635a7d77dd
This commit allows compiling LyX with Qt6 when using autotools. For a successful compilation the following 2 conditions must be met. 1) The Qt6 qmake has to come first in PATH, so that the command "qmake -v | grep -o 'Qt version .'" returns "Qt version 6". 2) The --enable-qt6 switch has to be passed to the configure command. If --enable-qt6 is used but Qt6 is not found, Qt5 is tried as a fallback. If also Qt5 is not found, configuring for Qt4 is attempted. If --enable-qt6 is not used, then things go as usual. This means that Qt5 is tried first and then Qt4, unless --disable-qt5 is used, in which case Qt4 is directly attempted. This means that existing scripts should continue working unmodified. LyX should compile with Qt6 on windows and linux, and possibly also on mac, but I could not test that. However, it is not guaranteed that it works as it should. In particular I am not sure that I got right the conversion from QRegExp to QRegularExpression. For sure, the syntax highlighting seems to not work right. Someone in the know should take a look at that. I am able to load documents and compile them but some thourough testing is needed. However, when compiling for Qt5 or Qt4, I tried to make sure that the functionality is preserved.
99 lines
2.1 KiB
C++
99 lines
2.1 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiLog.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author John Levon
|
|
* \author Angus Leeming
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef GUILOG_H
|
|
#define GUILOG_H
|
|
|
|
#include "GuiDialog.h"
|
|
#include "ui_LogUi.h"
|
|
|
|
#include "support/FileName.h"
|
|
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class LogHighlighter;
|
|
|
|
class GuiLog : public GuiDialog, public Ui::LogUi
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GuiLog(GuiView & lv);
|
|
|
|
private Q_SLOTS:
|
|
void updateContents() override;
|
|
/// find content
|
|
void find();
|
|
/// jump to next error message
|
|
void on_nextErrorPB_clicked();
|
|
/// jump to next warning
|
|
void on_nextWarningPB_clicked();
|
|
/// open containing directory
|
|
void on_openDirPB_clicked();
|
|
/// Log type changed
|
|
void typeChanged(int);
|
|
|
|
private:
|
|
/// Apply changes
|
|
void applyView() override {}
|
|
|
|
/// log syntax highlighter
|
|
LogHighlighter * highlighter;
|
|
|
|
/** \param data should contain "<logtype> <logfile>"
|
|
* where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
|
|
*/
|
|
bool initialiseParams(std::string const & data) override;
|
|
///
|
|
void clearParams() override;
|
|
///
|
|
void dispatchParams() override {}
|
|
///
|
|
bool isBufferDependent() const override { return true; }
|
|
|
|
/// The title displayed by the dialog reflects the \c LogType
|
|
docstring title() const;
|
|
/// put the log file into the ostream
|
|
void getContents(std::ostream & ss) const;
|
|
#if QT_VERSION < 0x060000
|
|
/// go to the next occurrence of the RegExp
|
|
void goTo(QRegExp const & exp) const;
|
|
/// does the document after cursor position contain the RegExp?
|
|
bool contains(QRegExp const & exp) const;
|
|
#else
|
|
/// go to the next occurrence of the RegExp
|
|
void goTo(QRegularExpression const & exp) const;
|
|
/// does the document after cursor position contain the RegExp?
|
|
bool contains(QRegularExpression const & exp) const;
|
|
#endif
|
|
|
|
private:
|
|
/// Recognized log file-types
|
|
enum LogType {
|
|
LatexLog,
|
|
LiterateLog,
|
|
Lyx2lyxLog,
|
|
VCLog
|
|
};
|
|
|
|
LogType type_;
|
|
support::FileName logfile_;
|
|
};
|
|
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUILOG_H
|