Commit b20f6486 authored by Michael Reeves's avatar Michael Reeves

Remove OS2 support

Scrap old OS support QT5 is not even ported to OS2.
Scrap Clearcase intigration not maintainable by myself was expermential.
parent ddec22f7
......@@ -657,7 +657,7 @@ QStringList SourceData::readAndPreprocess(QTextCodec* pEncoding, bool bAutoDetec
if(faIn.exists()) // fileInSize > 0 )
{
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
QString catCmd = "type";
fileNameIn1.replace('/', "\\");
#else
......
......@@ -76,7 +76,7 @@ class DiffTextWindowData
m_bMyUpdate = false;
m_bSelectionInProgress = false;
m_pTextCodec = nullptr;
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
m_eLineEndStyle = eLineEndStyleDos;
#else
m_eLineEndStyle = eLineEndStyleUnix;
......@@ -1387,7 +1387,7 @@ QString DiffTextWindow::getSelection()
if(d->m_selection.within(line, size) &&
!(d->m_bWordWrap && it + 1 < vectorSize && d3l == d->m_diff3WrapLineVector[it + 1].pD3L))
{
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
selectionString += '\r';
#endif
selectionString += '\n';
......
......@@ -3145,7 +3145,7 @@ bool DirectoryMergeWindow::Data::copyFLD(const QString& srcName, const QString&
if(fi.isSymLink() && ((fi.isDir() && !m_bFollowDirLinks) || (!fi.isDir() && !m_bFollowFileLinks)))
{
m_pStatusInfo->addText(i18n("copyLink( %1 -> %2 )", srcName, destName));
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
// What are links?
#else
if(m_bSimulatedMergeStarted)
......
......@@ -861,7 +861,7 @@ bool FileAccess::removeDir(const QString& dirName)
return fh.rmDir(dirName);
}
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
bool FileAccess::symLink(const QString& /*linkTarget*/, const QString& /*linkLocation*/)
{
return false;
......@@ -1685,7 +1685,7 @@ bool FileAccessJobHandler::listDir(t_DirectoryList* pDirList, bool bRecursive, b
{
cvsIgnoreList.init(*m_pFileAccess, cvsIgnoreExists(pDirList));
}
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
bool bCaseSensitive = false;
#else
bool bCaseSensitive = true;
......
......@@ -196,7 +196,7 @@ KDiff3App::KDiff3App(QWidget* pParent, const char* /*name*/, KDiff3Part* pKDiff3
pVBoxLayout->addWidget(pTextEdit);
pDialog->resize(600, 400);
pDialog->exec();
#if !defined(_WIN32) && !defined(Q_OS_OS2)
#if !defined(_WIN32)
// A windows program has no console
printf("%s\n", title.toLatin1().constData());
printf("%s\n", s.toLatin1().constData());
......@@ -632,7 +632,7 @@ void KDiff3App::initActions(KActionCollection* ac)
addManualDiffHelp = KDiff3::createAction<QAction>(i18n("Add Manual Diff Alignment"), QKeySequence(Qt::CTRL + Qt::Key_Y), this, SLOT(slotAddManualDiffHelp()), ac, "diff_add_manual_diff_help");
clearManualDiffHelpList = KDiff3::createAction<QAction>(i18n("Clear All Manual Diff Alignments"), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Y), this, SLOT(slotClearManualDiffHelpList()), ac, "diff_clear_manual_diff_help_list");
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)//TODO:Huh?!
KDiff3::createAction<QAction>(i18n("Focus Next Window"), QKeySequence(Qt::CTRL + Qt::Key_Tab), this, SLOT(slotWinFocusNext()), ac, "win_focus_next");
#endif
winFocusPrev = KDiff3::createAction<QAction>(i18n("Focus Prev Window"), QKeySequence(Qt::ALT + Qt::Key_Left), this, SLOT(slotWinFocusPrev()), ac, "win_focus_prev");
......
......@@ -66,7 +66,7 @@ static KAboutData* s_pAboutData;
static void showHelp()
{
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
QString exePath = QCoreApplication::applicationDirPath();
QFileInfo helpFile( exePath + "\\doc\\en\\index.html" );
......@@ -118,7 +118,7 @@ static void showHelp()
QString getTranslationDir(const QString& locale)
{
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
QUNUSED(locale);
QString exePath;
exePath = QCoreApplication::applicationDirPath();
......@@ -419,7 +419,7 @@ QString KStandardDirs::findResource(const QString& resource, const QString& /*ap
{
if (resource=="config")
{
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
QString exePath = QCoreApplication::applicationDirPath();
QString configPath = exePath + "/.kdiff3rc"; // This is useful for portable installations (e.g. on USB-Stick)
if ( QFile::exists( configPath ) )
......@@ -981,7 +981,7 @@ KApplication::KApplication()
: QApplication( s_argc,s_argv )
{
kapp = this;
#if ! ( defined(_WIN32) || defined(Q_OS_OS2) )
#if ! ( defined(_WIN32) )
parseOptions();
#endif
}
......@@ -1100,7 +1100,7 @@ void KApplication::parseOptions()
}
s += "\n"+i18n("For more documentation, see the help-menu or the subdirectory doc.")+"\n";
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
// A windows program has no console
if ( 0==QMessageBox::information(0, i18n("KDiff3-Usage"), s, i18n("Ignore"),i18n("Exit") ) )
continue;
......
......@@ -121,50 +121,6 @@ int main(int argc, char* argv[])
QApplication app(argc, argv); // KAboutData and QCommandLineParser depend on this being setup.
KCrash::initialize();
#ifdef _WIN32
/* KDiff3 can be used as replacement for the text-diff and merge tool provided by
Clearcase. This is experimental and so far has only been tested under Windows.
There are two ways to use KDiff3 with clearcase
- The file lib/mgrs/map contains the list of compare/merge tasks on one side and
the tool on the other. Originally this contains only clearcase tools, but you can
edit this file and put kdiff3 there instead. (Recommended method)
- Exchange the original program with KDiff3: (Hackish, no fine control)
1. In the Clearcase "bin"-directory rename "cleardiffmrg.exe" to "cleardiffmrg_orig.exe".
2. Copy kdiff3.exe into that "bin"-directory and rename it to "cleardiffmrg.exe".
(Also copy the other files that are needed by KDiff3 there.)
Now when a file comparison or merge is done by Clearcase then of course KDiff3 will be
run instead.
If the commandline contains the option "-directory" then KDiff3 can't do it but will
run "cleardiffmrg_orig.exe" instead.
*/
// Write all args into a temporary file. Uncomment this for debugging purposes.
/*
FILE* f = fopen(QDir::toNativeSeparators(QDir::homePath()+"//kdiff3_call_args.txt").toLatin1().data(),"w");
for(int i=0; i< argc; ++i)
fprintf(f,"Arg %d: %s\n", i, argv[i]);
fclose(f);
// Call orig cleardiffmrg.exe to see what result it returns.
int result=0;
result = ::_spawnvp(_P_WAIT , "C:\\Programme\\Rational\\ClearCase\\bin\\cleardiffmrg.exe", argv );
fprintf(f,"Result: %d\n", result );
fclose(f);
return result;
*/
// KDiff3 can replace cleardiffmrg from clearcase. But not all functions.
if(isOptionUsed("directory", argc, argv))
{
return ::_spawnvp(_P_WAIT, "cleardiffmrg_orig", argv);
}
#endif
#ifdef Q_OS_OS2
// expand wildcards on the command line
_wildcard(&argc, &argv);
#endif
//QApplication::setColorSpec( QApplication::ManyColor ); // Grab all 216 colors
......@@ -225,7 +181,7 @@ int main(int argc, char* argv[])
QString errorMessage = cmdLineParser->errorText();
QString helpText = cmdLineParser->helpText();
QMessageBox::warning(nullptr, aboutData.displayName(), "<html><head/><body><h2>" + errorMessage + "</h2><pre>" + helpText + "</pre></body></html>");
#if !defined(_WIN32) && !defined(Q_OS_OS2)
#if !defined(_WIN32)
fputs(qPrintable(errorMessage), stderr);
fputs("\n\n", stderr);
fputs(qPrintable(helpText + "\n"), stderr);
......@@ -237,14 +193,14 @@ int main(int argc, char* argv[])
if(cmdLineParser->isSet(QStringLiteral("version"))) {
QMessageBox::information(nullptr, aboutData.displayName(),
aboutData.displayName() + ' ' + aboutData.version());
#if !defined(_WIN32) && !defined(Q_OS_OS2)
#if !defined(_WIN32)
printf("%s %s\n", appName.constData(), appVersion.constData());
#endif
exit(0);
}
if(cmdLineParser->isSet(QStringLiteral("help"))) {
QMessageBox::warning(nullptr, aboutData.displayName(), "<html><head/><body><pre>" + cmdLineParser->helpText() + "</pre></body></html>");
#if !defined(_WIN32) && !defined(Q_OS_OS2)
#if !defined(_WIN32)
fputs(qPrintable(cmdLineParser->helpText()), stdout);
#endif
exit(0);
......
......@@ -1258,7 +1258,7 @@ void OptionDialog::setupDirectoryMergePage(void)
OptionCheckBox* pFindHidden = new OptionCheckBox(i18n("Find hidden files and directories"), true, "FindHidden", &m_options.m_bDmFindHidden, page, this);
gbox->addWidget(pFindHidden, line, 0, 1, 2);
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
pFindHidden->setToolTip(i18n("Finds files and directories with the hidden attribute."));
#else
pFindHidden->setToolTip(i18n("Finds files and directories starting with '.'."));
......@@ -1285,7 +1285,7 @@ void OptionDialog::setupDirectoryMergePage(void)
// "Files and directories without change will not appear in the list."));
//++line;
#if defined(_WIN32) || defined(Q_OS_OS2)
#if defined(_WIN32)
bool bCaseSensitiveFilenameComparison = false;
#else
bool bCaseSensitiveFilenameComparison = true;
......@@ -1559,7 +1559,7 @@ void OptionDialog::setupRegionalPage(void)
pLanguage->addItem("Auto"); // Must not translate, won't work otherwise!
pLanguage->addItem("en_orig");
#if !defined(_WIN32) && !defined(Q_OS_OS2) && !defined(__APPLE__)
#if !defined(_WIN32) && !defined(__APPLE__)
// Read directory: Find all kdiff3_*.qm-files and insert the found files here
QDir localeDir("/usr/share/locale"); // See also kreplacements.cpp: getTranslationDir()
QStringList dirList = localeDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment