mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
It takes the place of the "Copy to Clipboard" button which was redundant.
This commit is contained in:
parent
5920b231f4
commit
f441590c8e
@ -24,8 +24,10 @@
|
|||||||
#include "support/FileName.h"
|
#include "support/FileName.h"
|
||||||
#include "support/gettext.h"
|
#include "support/gettext.h"
|
||||||
|
|
||||||
|
#include <QDesktopServices>
|
||||||
#include <QTextBrowser>
|
#include <QTextBrowser>
|
||||||
#include <QSyntaxHighlighter>
|
#include <QSyntaxHighlighter>
|
||||||
|
#include <QUrl>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -189,6 +191,23 @@ void GuiLog::on_nextWarningPB_clicked()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiLog::on_openDirPB_clicked()
|
||||||
|
{
|
||||||
|
support::FileName dir = logfile_.onlyPath();
|
||||||
|
if (!dir.exists())
|
||||||
|
return;
|
||||||
|
QUrl qdir(toqstr(from_utf8("file://" + dir.absFileName())),
|
||||||
|
QUrl::StrictMode);
|
||||||
|
// Give hints in case of bugs
|
||||||
|
if (!qdir.isValid()) {
|
||||||
|
LYXERR0("QUrl is invalid!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!QDesktopServices::openUrl(qdir))
|
||||||
|
LYXERR0("Unable to open QUrl even though dir exists!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiLog::goTo(QRegExp const & exp) const
|
void GuiLog::goTo(QRegExp const & exp) const
|
||||||
{
|
{
|
||||||
QTextCursor const newc =
|
QTextCursor const newc =
|
||||||
|
@ -41,6 +41,8 @@ private Q_SLOTS:
|
|||||||
void on_nextErrorPB_clicked();
|
void on_nextErrorPB_clicked();
|
||||||
/// jump to next warning
|
/// jump to next warning
|
||||||
void on_nextWarningPB_clicked();
|
void on_nextWarningPB_clicked();
|
||||||
|
/// open containing directory
|
||||||
|
void on_openDirPB_clicked();
|
||||||
/// Log type changed
|
/// Log type changed
|
||||||
void typeChanged(int);
|
void typeChanged(int);
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0" >
|
<ui version="4.0" >
|
||||||
<class>LogUi</class>
|
<class>LogUi</class>
|
||||||
<widget class="QDialog" name="LogUi" >
|
<widget class="QDialog" name="LogUi" >
|
||||||
@ -105,9 +106,9 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2" >
|
<item row="4" column="0" colspan="2" >
|
||||||
<widget class="QPushButton" name="copyPB" >
|
<widget class="QPushButton" name="openDirPB" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Copy to Clip&board</string>
|
<string>&Open Containing Directory</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user