From 86187cb0d45d6eeedd5ac6ceee4b584f81d74447 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 13 May 2022 17:49:55 +0900 Subject: Kommander: removed 'Run in KDE4' menu entry and code. Signed-off-by: Michele Calgaro --- kommander/editor/mainwindow.cpp | 64 ----------------------------------------- 1 file changed, 64 deletions(-) (limited to 'kommander/editor/mainwindow.cpp') diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index 3fde775c..5ff1b6fb 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -471,70 +471,6 @@ void MainWindow::runForm() } -void MainWindow::runForm4() -{ - if (previewing) - { - KMessageBox::information(this, i18n("There is a dialog already running."), i18n("Run")); - return; - } - FormWindow* form = activeForm(); - if (!form || !form->formFile()) - return; - - TQObjectList *editors = queryList("AssocTextEditor"); - TQObjectListIt it(*editors); - TQObject *editor; - - while ((editor = it.current()) != 0L) - { - ++it; - static_cast(TQT_TQWIDGET(editor))->save(); - } - delete editors; - - if (form->formFile()->hasTempFileName()) - { - if (!form->formFile()->saveAs()) - return; - } - - m_fileName = form->formFile()->fileName(); - m_backupName = m_fileName + ".running"; - m_modified = form->formFile()->isModified(); - - bool readOnlyFile = !TQFileInfo(m_fileName).isWritable(); - struct stat statbuf; - ::stat(m_fileName.local8Bit(), &statbuf); - if (!readOnlyFile && !TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true)) - { - KMessageBox::error(this, i18n("Cannot create temporary file %1.").arg(m_backupName)); - return; - } - form->formFile()->setFileName(m_fileName); - if (!readOnlyFile || m_modified) - form->formFile()->setModified(true); - if (form->formFile()->save(false)) - { - if (!readOnlyFile && !TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true)) - { - KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(m_fileName + ".backup")); - } - ::chmod(m_fileName.local8Bit(), S_IRWXU); - TDEProcess* process = new TDEProcess; - process->setUseShell(true); - (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName()); - connect(process, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)), messageLog, - TQT_SLOT(receivedStdout(TDEProcess*, char*, int))); - connect(process, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), messageLog, - TQT_SLOT(receivedStderr(TDEProcess*, char*, int))); - connect(process, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(closeRunningForm(TDEProcess*))); - messageLog->clear(MessageLog::All); - previewing = process->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput); - } -} - - void MainWindow::closeRunningForm(TDEProcess* process) { previewing = false; -- cgit v1.2.1