440 lines
17 KiB
Diff
440 lines
17 KiB
Diff
diff --git a/konsole-v24.08.3/CMakeLists.txt b/konsole-v24.08.3/CMakeLists.txt
|
|
--- a/konsole-v24.08.3/CMakeLists.txt
|
|
+++ b/konsole-v24.08.3/CMakeLists.txt
|
|
@@ -43,13 +43,23 @@ include(ECMQtDeclareLoggingCategory)
|
|
# Allows passing e.g. -DECM_ENABLE_SANITIZERS='address;undefined' to cmake.
|
|
include(ECMEnableSanitizers)
|
|
|
|
+string(REPLACE " -fpermissive" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
+
|
|
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED
|
|
Core
|
|
- Multimedia
|
|
- PrintSupport
|
|
Widgets
|
|
Core5Compat
|
|
)
|
|
+find_package(Qt6Multimedia ${QT_MIN_VERSION} CONFIG QUIET)
|
|
+find_package(Qt6PrintSupport ${QT_MIN_VERSION} CONFIG QUIET)
|
|
+set(HAVE_QTMULTIMEDIA 0)
|
|
+if(TARGET Qt6::Multimedia)
|
|
+ set(HAVE_QTMULTIMEDIA 1)
|
|
+endif()
|
|
+set(HAVE_QTPRINTSUPPORT 0)
|
|
+if(TARGET Qt6::PrintSupport)
|
|
+ set(HAVE_QTPRINTSUPPORT 1)
|
|
+endif()
|
|
|
|
find_package(KF6 ${KF6_DEP_VERSION} REQUIRED
|
|
Bookmarks
|
|
@@ -104,7 +114,7 @@ if(USE_DBUS)
|
|
set(HAVE_DBUS 1)
|
|
endif()
|
|
|
|
-find_package(KF6DocTools ${KF6_DEP_VERSION})
|
|
+find_package(KF6DocTools ${KF6_DEP_VERSION} QUIET)
|
|
set_package_properties(KF6DocTools PROPERTIES DESCRIPTION
|
|
"Tools to generate documentation"
|
|
TYPE OPTIONAL
|
|
diff --git a/konsole-v24.08.3/src/CMakeLists.txt b/konsole-v24.08.3/src/CMakeLists.txt
|
|
--- a/konsole-v24.08.3/src/CMakeLists.txt
|
|
+++ b/konsole-v24.08.3/src/CMakeLists.txt
|
|
@@ -65,8 +65,6 @@ endif()
|
|
|
|
set(konsole_LIBS
|
|
KF6::XmlGui
|
|
- Qt::Multimedia
|
|
- Qt::PrintSupport
|
|
Qt::Xml
|
|
KF6::Notifications
|
|
KF6::WindowSystem
|
|
@@ -79,6 +77,14 @@ set(konsole_LIBS
|
|
KF6::NewStuffCore
|
|
)
|
|
|
|
+if(TARGET Qt6::Multimedia)
|
|
+ list(APPEND konsole_LIBS Qt::Multimedia)
|
|
+endif()
|
|
+
|
|
+if(TARGET Qt6::PrintSupport)
|
|
+ list(APPEND konsole_LIBS Qt::PrintSupport)
|
|
+endif()
|
|
+
|
|
if(NOT WIN32)
|
|
list(APPEND konsole_LIBS
|
|
KF6::Pty
|
|
@@ -234,13 +240,16 @@ set(konsoleprivate_SRCS ${windowadaptors_SRCS}
|
|
widgets/TerminalHeaderBar.cpp
|
|
widgets/ViewContainer.cpp
|
|
widgets/ViewSplitter.cpp
|
|
- widgets/KonsolePrintManager.cpp
|
|
|
|
${dbus_xml_srcs}
|
|
|
|
../data/data.qrc
|
|
../desktop/konsole.qrc)
|
|
|
|
+if(TARGET Qt6::PrintSupport)
|
|
+ list(APPEND konsoleprivate_SRCS widgets/KonsolePrintManager.cpp)
|
|
+endif()
|
|
+
|
|
kconfig_add_kcfg_files(konsoleprivate_SRCS settings/KonsoleSettings.kcfgc)
|
|
|
|
### Konsole Application
|
|
diff --git a/konsole-v24.08.3/src/config-konsole.h.cmake b/konsole-v24.08.3/src/config-konsole.h.cmake
|
|
--- a/konsole-v24.08.3/src/config-konsole.h.cmake
|
|
+++ b/konsole-v24.08.3/src/config-konsole.h.cmake
|
|
@@ -17,3 +17,7 @@
|
|
|
|
/* Defined if system has the malloc_trim function, which is a GNU extension */
|
|
#cmakedefine01 HAVE_MALLOC_TRIM
|
|
+
|
|
+#cmakedefine01 HAVE_QTMULTIMEDIA
|
|
+
|
|
+#cmakedefine01 HAVE_QTPRINTSUPPORT
|
|
diff --git a/konsole-v24.08.3/src/Vt102Emulation.h b/konsole-v24.08.3/src/Vt102Emulation.h
|
|
--- a/konsole-v24.08.3/src/Vt102Emulation.h
|
|
+++ b/konsole-v24.08.3/src/Vt102Emulation.h
|
|
@@ -9,9 +9,12 @@
|
|
#define VT102EMULATION_H
|
|
|
|
// Qt
|
|
+#include "config-konsole.h"
|
|
#include <QHash>
|
|
#include <QMap>
|
|
+#if HAVE_QTMULTIMEDIA
|
|
#include <QMediaPlayer>
|
|
+#endif
|
|
#include <QPair>
|
|
#include <QVector>
|
|
#include <QList>
|
|
@@ -100,7 +103,9 @@ private Q_SLOTS:
|
|
// pair in _pendingSessionAttributesUpdates.
|
|
// Used to buffer multiple attribute updates in the current session
|
|
void updateSessionAttributes();
|
|
+#if HAVE_QTMULTIMEDIA
|
|
void deletePlayer(QMediaPlayer::MediaStatus);
|
|
+#endif
|
|
|
|
private:
|
|
unsigned int applyCharset(uint c);
|
|
@@ -315,7 +320,9 @@ private:
|
|
// For kitty graphics protocol - image cache
|
|
int getFreeGraphicsImageId();
|
|
|
|
+#if HAVE_QTMULTIMEDIA
|
|
QMediaPlayer *player;
|
|
+#endif
|
|
};
|
|
|
|
}
|
|
diff --git a/konsole-v24.08.3/src/Vt102Emulation.cpp b/konsole-v24.08.3/src/Vt102Emulation.cpp
|
|
--- a/konsole-v24.08.3/src/Vt102Emulation.cpp
|
|
+++ b/konsole-v24.08.3/src/Vt102Emulation.cpp
|
|
@@ -12,7 +12,9 @@
|
|
#include <cstdio>
|
|
|
|
// Qt
|
|
+#if HAVE_QTMULTIMEDIA
|
|
#include <QAudioOutput>
|
|
+#endif
|
|
#include <QBuffer>
|
|
#include <QEvent>
|
|
#include <QKeyEvent>
|
|
@@ -70,7 +72,9 @@ Vt102Emulation::Vt102Emulation()
|
|
, _pendingSessionAttributesUpdates(QHash<int, QString>())
|
|
, _sessionAttributesUpdateTimer(new QTimer(this))
|
|
, _reportFocusEvents(false)
|
|
+#if HAVE_QTMULTIMEDIA
|
|
, player(nullptr)
|
|
+#endif
|
|
{
|
|
_sessionAttributesUpdateTimer->setSingleShot(true);
|
|
QObject::connect(_sessionAttributesUpdateTimer, &QTimer::timeout, this, &Konsole::Vt102Emulation::updateSessionAttributes);
|
|
@@ -1295,6 +1299,7 @@ void Vt102Emulation::processSessionAttributeRequest(const int tokenSize, const u
|
|
}
|
|
}
|
|
if (inlineMedia) {
|
|
+#if HAVE_QTMULTIMEDIA
|
|
if (player == nullptr) {
|
|
player = new QMediaPlayer(this);
|
|
player->setAudioOutput(new QAudioOutput(player));
|
|
@@ -1306,6 +1311,7 @@ void Vt102Emulation::processSessionAttributeRequest(const int tokenSize, const u
|
|
delete (QIODevice *)(player->sourceDevice());
|
|
player->setSourceDevice(buffer);
|
|
player->play();
|
|
+#endif
|
|
return;
|
|
}
|
|
if (!inlineImage) {
|
|
@@ -1333,6 +1339,7 @@ void Vt102Emulation::processSessionAttributeRequest(const int tokenSize, const u
|
|
_sessionAttributesUpdateTimer->start(20);
|
|
}
|
|
|
|
+#if HAVE_QTMULTIMEDIA
|
|
void Vt102Emulation::deletePlayer(QMediaPlayer::MediaStatus mediaStatus)
|
|
{
|
|
if (mediaStatus == QMediaPlayer::EndOfMedia || mediaStatus == QMediaPlayer::InvalidMedia) {
|
|
@@ -1342,6 +1349,7 @@ void Vt102Emulation::deletePlayer(QMediaPlayer::MediaStatus mediaStatus)
|
|
player = nullptr;
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
void Vt102Emulation::updateSessionAttributes()
|
|
{
|
|
diff --git a/konsole-v24.08.3/src/session/SessionController.cpp b/konsole-v24.08.3/src/session/SessionController.cpp
|
|
--- a/konsole-v24.08.3/src/session/SessionController.cpp
|
|
+++ b/konsole-v24.08.3/src/session/SessionController.cpp
|
|
@@ -8,6 +8,8 @@
|
|
// Own
|
|
#include "SessionController.h"
|
|
|
|
+#include "config-konsole.h"
|
|
+
|
|
#include "profile/ProfileManager.h"
|
|
#include "terminalDisplay/TerminalColor.h"
|
|
#include "terminalDisplay/TerminalFonts.h"
|
|
@@ -145,7 +147,9 @@ SessionController::SessionController(Session *sessionParam, TerminalDisplay *vie
|
|
setupExtraActions();
|
|
}
|
|
|
|
+#if HAVE_QTPRINTSUPPORT
|
|
connect(this, &SessionController::requestPrint, view(), &TerminalDisplay::printScreen);
|
|
+#endif
|
|
|
|
actionCollection()->addAssociatedWidget(viewParam);
|
|
|
|
@@ -730,9 +734,11 @@ void SessionController::setupCommonActions()
|
|
action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_S));
|
|
#endif
|
|
|
|
+#if HAVE_QTPRINTSUPPORT
|
|
action = KStandardAction::print(this, &SessionController::requestPrint, collection);
|
|
action->setText(i18n("&Print Screen..."));
|
|
collection->setDefaultShortcut(action, Konsole::ACCEL | Qt::Key_P);
|
|
+#endif
|
|
|
|
action = collection->addAction(QStringLiteral("adjust-history"), this, &SessionController::showHistoryOptions);
|
|
action->setText(i18n("Adjust Scrollback..."));
|
|
diff --git a/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.h b/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.h
|
|
--- a/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.h
|
|
+++ b/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.h
|
|
@@ -8,6 +8,8 @@
|
|
#ifndef TERMINALDISPLAY_H
|
|
#define TERMINALDISPLAY_H
|
|
|
|
+#include "config-konsole.h"
|
|
+
|
|
// Qt
|
|
#include <QColor>
|
|
#include <QPointer>
|
|
@@ -834,7 +836,9 @@ private:
|
|
TerminalColor *_terminalColor = nullptr;
|
|
std::unique_ptr<TerminalFont> _terminalFont;
|
|
|
|
+#if HAVE_QTPRINTSUPPORT
|
|
std::unique_ptr<KonsolePrintManager> _printManager;
|
|
+#endif
|
|
|
|
bool _semanticUpDown;
|
|
bool _semanticInputClick;
|
|
diff --git a/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp b/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp
|
|
--- a/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp
|
|
+++ b/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp
|
|
@@ -55,7 +55,9 @@
|
|
#include "../characters/ExtendedCharTable.h"
|
|
#include "../characters/LineBlockCharacters.h"
|
|
#include "../decoders/PlainTextDecoder.h"
|
|
+#if HAVE_QTPRINTSUPPORT
|
|
#include "../widgets/KonsolePrintManager.h"
|
|
+#endif
|
|
#include "../widgets/TerminalDisplayAccessible.h"
|
|
#include "EscapeSequenceUrlExtractor.h"
|
|
#include "PrintOptions.h"
|
|
@@ -308,6 +310,7 @@ TerminalDisplay::TerminalDisplay(QWidget *parent)
|
|
|
|
_terminalPainter = new TerminalPainter(this);
|
|
|
|
+#if HAVE_QTPRINTSUPPORT
|
|
auto ldrawBackground = [this](QPainter &painter, const QRect &rect, const QColor &backgroundColor, bool useOpacitySetting) {
|
|
_terminalPainter->drawBackground(painter, rect, backgroundColor, useOpacitySetting);
|
|
};
|
|
@@ -319,6 +322,7 @@ TerminalDisplay::TerminalDisplay(QWidget *parent)
|
|
};
|
|
|
|
_printManager.reset(new KonsolePrintManager(ldrawBackground, ldrawContents, lgetBackgroundColor));
|
|
+#endif
|
|
ubidi = ubidi_open();
|
|
}
|
|
|
|
@@ -3182,6 +3186,7 @@ void TerminalDisplay::applyProfile(const Profile::Ptr &profile)
|
|
|
|
void TerminalDisplay::printScreen()
|
|
{
|
|
+#if HAVE_QTPRINTSUPPORT
|
|
auto lprintContent = [this](QPainter &painter, bool friendly) {
|
|
QPoint columnLines(_usedLines, _usedColumns);
|
|
auto lfontget = [this]() {
|
|
@@ -3194,6 +3199,7 @@ void TerminalDisplay::printScreen()
|
|
_printManager->printContent(painter, friendly, columnLines, lfontget, lfontset);
|
|
};
|
|
_printManager->printRequest(lprintContent, this);
|
|
+#endif
|
|
}
|
|
|
|
Character TerminalDisplay::getCursorCharacter(int column, int line)
|
|
diff --git a/konsole-v24.08.3/src/colorscheme/ColorSchemeWallpaper.cpp b/konsole-v24.08.3/src/colorscheme/ColorSchemeWallpaper.cpp
|
|
--- a/konsole-v24.08.3/src/colorscheme/ColorSchemeWallpaper.cpp
|
|
+++ b/konsole-v24.08.3/src/colorscheme/ColorSchemeWallpaper.cpp
|
|
@@ -201,11 +201,11 @@ QImage ColorSchemeWallpaper::FlipImage(const QImage image, const ColorSchemeWall
|
|
{
|
|
switch (flipType) {
|
|
case Horizontal:
|
|
- return image.mirrored(true, false);
|
|
+ return image.flipped(Qt::Horizontal);
|
|
case Vertical:
|
|
- return image.mirrored(false, true);
|
|
+ return image.flipped(Qt::Vertical);
|
|
case Both:
|
|
- return image.mirrored(true, true);
|
|
+ return image.flipped(Qt::Horizontal | Qt::Vertical);
|
|
default:
|
|
return image;
|
|
}
|
|
diff --git a/konsole-v24.08.3/src/EscapeSequenceUrlExtractor.cpp b/konsole-v24.08.3/src/EscapeSequenceUrlExtractor.cpp
|
|
--- a/konsole-v24.08.3/src/EscapeSequenceUrlExtractor.cpp
|
|
+++ b/konsole-v24.08.3/src/EscapeSequenceUrlExtractor.cpp
|
|
@@ -33,7 +33,8 @@ void EscapeSequenceUrlExtractor::appendUrlText_impl(uint c)
|
|
const int realCcolumn = _screen->getCursorY() + _screen->getHistLines();
|
|
_currentUrl.begin = Coordinate{realCcolumn, _screen->getCursorX() - 1};
|
|
}
|
|
- _currentUrl.text += QString::fromUcs4(&c, 1);
|
|
+ const auto codepoint = static_cast<char32_t>(c);
|
|
+ _currentUrl.text += QString::fromUcs4(&codepoint, 1);
|
|
}
|
|
|
|
void EscapeSequenceUrlExtractor::setUrl(const QString &url)
|
|
diff --git a/konsole-v24.08.3/src/ProcessInfo.cpp b/konsole-v24.08.3/src/ProcessInfo.cpp
|
|
--- a/konsole-v24.08.3/src/ProcessInfo.cpp
|
|
+++ b/konsole-v24.08.3/src/ProcessInfo.cpp
|
|
@@ -1272,6 +1272,7 @@ ProcessInfo *ProcessInfo::newInstance(int pid, int sessionPid)
|
|
#elif defined(Q_OS_OPENBSD)
|
|
info = new OpenBSDProcessInfo(pid);
|
|
#else
|
|
+ Q_UNUSED(sessionPid);
|
|
info = new NullProcessInfo(pid);
|
|
#endif
|
|
info->readProcessInfo(pid);
|
|
diff --git a/konsole-v24.08.3/src/Screen.cpp b/konsole-v24.08.3/src/Screen.cpp
|
|
--- a/konsole-v24.08.3/src/Screen.cpp
|
|
+++ b/konsole-v24.08.3/src/Screen.cpp
|
|
@@ -1838,16 +1838,17 @@ void Screen::setSelectionEnd(const int x, const int y, const bool trimTrailingWh
|
|
// Do not let this code go to a release.
|
|
if (_screenLines.size() < line) {
|
|
QFile konsoleInfo(QStringLiteral("~/konsole_info_crash_array_out_of_bounds.txt"));
|
|
- konsoleInfo.open(QIODevice::WriteOnly);
|
|
- QTextStream messages(&konsoleInfo);
|
|
-
|
|
- messages << "_selBegin" << _selBegin << "\n";
|
|
- messages << "endPos" << endPos << "\n";
|
|
- messages << "_selBottomRight" << _selBottomRight << "\n";
|
|
- messages << "bottomRow Calculation: (_selBottomRight / _columns) = " << _selBottomRight << "/" << _columns << "\n";
|
|
- messages << "line Calculation: (bottomRow - _history->getLines()) = " << bottomRow << "-" << _history->getLines() << "\n";
|
|
- messages << "_screenLines.count()" << _screenLines.size() << "\n";
|
|
- messages << "line" << line << "\n";
|
|
+ if (konsoleInfo.open(QIODevice::WriteOnly)) {
|
|
+ QTextStream messages(&konsoleInfo);
|
|
+
|
|
+ messages << "_selBegin" << _selBegin << "\n";
|
|
+ messages << "endPos" << endPos << "\n";
|
|
+ messages << "_selBottomRight" << _selBottomRight << "\n";
|
|
+ messages << "bottomRow Calculation: (_selBottomRight / _columns) = " << _selBottomRight << "/" << _columns << "\n";
|
|
+ messages << "line Calculation: (bottomRow - _history->getLines()) = " << bottomRow << "-" << _history->getLines() << "\n";
|
|
+ messages << "_screenLines.count()" << _screenLines.size() << "\n";
|
|
+ messages << "line" << line << "\n";
|
|
+ }
|
|
}
|
|
|
|
// HACK: do not crash.
|
|
diff --git a/konsole-v24.08.3/src/filterHotSpots/FileFilter.cpp b/konsole-v24.08.3/src/filterHotSpots/FileFilter.cpp
|
|
--- a/konsole-v24.08.3/src/filterHotSpots/FileFilter.cpp
|
|
+++ b/konsole-v24.08.3/src/filterHotSpots/FileFilter.cpp
|
|
@@ -93,7 +93,7 @@ QSharedPointer<HotSpot> FileFilter::newHotSpot(int startLine, int startColumn, i
|
|
|
|
// '.' and '..' could be valid hotspots, but '..................' most likely isn't
|
|
static const QRegularExpression allDotRe{QRegularExpression::anchoredPattern(QStringLiteral("\\.{3}"))};
|
|
- if (allDotRe.match(filename).hasMatch()) {
|
|
+ if (allDotRe.matchView(filename).hasMatch()) {
|
|
return nullptr;
|
|
}
|
|
|
|
diff --git a/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp b/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp
|
|
--- a/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp
|
|
+++ b/konsole-v24.08.3/src/terminalDisplay/TerminalDisplay.cpp
|
|
@@ -2309,7 +2309,7 @@ void TerminalDisplay::doPaste(QString text, bool appendReturn)
|
|
if (isUnsafe(c)) {
|
|
const QString sequence = charToSequence(c);
|
|
const QString description = characterDescriptions.value(c.unicode(), QString());
|
|
- QString entry = QStringLiteral("U+%1").arg(c.unicode(), 4, 16, QLatin1Char('0'));
|
|
+ QString entry = QStringLiteral("U+%1").arg(static_cast<uint>(c.unicode()), 4, 16, QLatin1Char('0'));
|
|
if (!sequence.isEmpty()) {
|
|
entry += QStringLiteral("\t%1").arg(sequence);
|
|
}
|
|
diff --git a/konsole-v24.08.3/src/MainWindow.cpp b/konsole-v24.08.3/src/MainWindow.cpp
|
|
--- a/konsole-v24.08.3/src/MainWindow.cpp
|
|
+++ b/konsole-v24.08.3/src/MainWindow.cpp
|
|
@@ -370,7 +370,7 @@ void MainWindow::setupActions()
|
|
});
|
|
|
|
// Set up themes
|
|
- auto *manager = new KColorSchemeManager(actionCollection());
|
|
+ auto *manager = KColorSchemeManager::instance();
|
|
manager->setAutosaveChanges(true);
|
|
KActionMenu *selectionMenu = KColorSchemeMenu::createMenu(manager, this);
|
|
auto winColorSchemeMenu = new QAction(this);
|
|
diff --git a/konsole-v24.08.3/src/plugins/QuickCommands/filtermodel.cpp b/konsole-v24.08.3/src/plugins/QuickCommands/filtermodel.cpp
|
|
--- a/konsole-v24.08.3/src/plugins/QuickCommands/filtermodel.cpp
|
|
+++ b/konsole-v24.08.3/src/plugins/QuickCommands/filtermodel.cpp
|
|
@@ -33,8 +33,9 @@ bool FilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParen
|
|
|
|
void FilterModel::setInvertFilter(bool invert)
|
|
{
|
|
+ beginFilterChange();
|
|
m_invertFilter = invert;
|
|
- invalidateFilter();
|
|
+ endFilterChange(QSortFilterProxyModel::Direction::Rows);
|
|
}
|
|
|
|
#include "moc_filtermodel.cpp"
|
|
diff --git a/konsole-v24.08.3/src/plugins/SSHManager/sshmanagerfiltermodel.cpp b/konsole-v24.08.3/src/plugins/SSHManager/sshmanagerfiltermodel.cpp
|
|
--- a/konsole-v24.08.3/src/plugins/SSHManager/sshmanagerfiltermodel.cpp
|
|
+++ b/konsole-v24.08.3/src/plugins/SSHManager/sshmanagerfiltermodel.cpp
|
|
@@ -31,8 +31,9 @@ bool SSHManagerFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
|
|
|
|
void SSHManagerFilterModel::setInvertFilter(bool invert)
|
|
{
|
|
+ beginFilterChange();
|
|
m_invertFilter = invert;
|
|
- invalidateFilter();
|
|
+ endFilterChange(QSortFilterProxyModel::Direction::Rows);
|
|
}
|
|
|
|
#include "moc_sshmanagerfiltermodel.cpp"
|
|
diff --git a/konsole-v24.08.3/src/plugins/QuickCommands/quickcommandswidget.cpp b/konsole-v24.08.3/src/plugins/QuickCommands/quickcommandswidget.cpp
|
|
--- a/konsole-v24.08.3/src/plugins/QuickCommands/quickcommandswidget.cpp
|
|
+++ b/konsole-v24.08.3/src/plugins/QuickCommands/quickcommandswidget.cpp
|
|
@@ -314,7 +314,11 @@ void QuickCommandsWidget::runShellCheck()
|
|
}
|
|
|
|
QTemporaryFile file;
|
|
- file.open();
|
|
+ if (!file.open()) {
|
|
+ ui->warning->setPlainText(file.errorString());
|
|
+ ui->tabWidget->setTabText(1, i18n("Warnings (*)"));
|
|
+ return;
|
|
+ }
|
|
|
|
QTextStream ts(&file);
|
|
ts << "#!/bin/bash\n";
|