mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
09700d5b71
Building on cd8be655
, we still allow viewing a produced PDF even if
there were compilation errors. However, now the user must click the
"Show Output Anyway" button in the LaTeX Errors dialog. The reason
is that before, there was a chance that the user would not realize
there was an error (because the PDF would be shown over the error
dialog). The approach in this commit makes it more clear that there
is an error.
A new LFUN is introduced, LFUN_BUFFER_VIEW_CACHE. It is useful not
just for the implementation of the "Show Output Anyway" button, but
also to show the last compiled version of a document, which can save
time if a document takes a long time to compile (e.g. heavy use of
knitr).
76 lines
1.3 KiB
C++
76 lines
1.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiErrorList.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Alfredo Braunstein
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef GUIERRORLIST_H
|
|
#define GUIERRORLIST_H
|
|
|
|
#include "GuiDialog.h"
|
|
#include "ErrorList.h"
|
|
#include "ui_ErrorListUi.h"
|
|
|
|
class QListWidgetItem;
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class GuiErrorList : public GuiDialog, public Ui::ErrorListUi
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GuiErrorList(GuiView & lv);
|
|
|
|
public Q_SLOTS:
|
|
/// select an entry
|
|
void select();
|
|
/// open the LaTeX log
|
|
void viewLog();
|
|
/// show the output file despite compilation errors
|
|
void showAnyway();
|
|
|
|
private:
|
|
///
|
|
void showEvent(QShowEvent *);
|
|
///
|
|
void paramsToDialog();
|
|
///
|
|
bool isBufferDependent() const { return true; }
|
|
///
|
|
bool initialiseParams(std::string const & data);
|
|
///
|
|
void clearParams() {}
|
|
///
|
|
void dispatchParams() {}
|
|
///
|
|
bool canApply() const { return true; }
|
|
|
|
/// goto this error in the parent bv. Returns success.
|
|
bool goTo(int item);
|
|
///
|
|
ErrorList const & errorList() const;
|
|
private:
|
|
///
|
|
std::string error_type_;
|
|
///
|
|
mutable ErrorList error_list_;
|
|
///
|
|
Buffer const * buf_;
|
|
/// the parent document name
|
|
docstring name_;
|
|
///
|
|
bool from_master_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUIERRORLIST_H
|