Browse Source

Make it compile and work in GCC / Linux

Michael Hansen 11 years ago
parent
commit
b48963b904
  1. 2
      Sources/Plasma/CoreLib/hsThread_Unix.cpp
  2. 2
      Sources/Plasma/CoreLib/plFileSystem.cpp
  3. 1
      Sources/Tools/plLocalizationEditor/CMakeLists.txt
  4. 8
      Sources/Tools/plLocalizationEditor/plEditDlg.cpp

2
Sources/Plasma/CoreLib/hsThread_Unix.cpp

@ -307,8 +307,8 @@ hsSemaphore::~hsSemaphore()
status = sem_close(fPSema);
} else {
status = sem_destroy(fPSema);
delete fPSema;
}
delete fPSema;
hsThrowIfOSErr(status);
#else
int status = ::pthread_cond_destroy(&fPCond);

2
Sources/Plasma/CoreLib/plFileSystem.cpp

@ -394,7 +394,7 @@ std::vector<plFileName> plFileSystem::ListDir(const plFileName &path, const char
continue;
}
if (pattern && pattern[0] && fnmatch(pattern, de->d_name, 0))
if (pattern && pattern[0] && fnmatch(pattern, de->d_name, 0) == 0)
contents.push_back(dir_name);
else if (!pattern || !pattern[0])
contents.push_back(dir_name);

1
Sources/Tools/plLocalizationEditor/CMakeLists.txt

@ -39,6 +39,7 @@ set(plLocalizationEditor_UIC_SOURCES
qt5_wrap_ui(plLocalizationEditor_UIC ${plLocalizationEditor_UIC_SOURCES})
# For generated ui_*.h files
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(plLocalizationEditor WIN32 ${plLocalizationEditor_HEADERS}

8
Sources/Tools/plLocalizationEditor/plEditDlg.cpp

@ -54,16 +54,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <functional>
#define ABOUT_TEXT R"(plLocalizationEditor
A basic editor for Plasma 21 localization resource files
Copyright (C) 2004 Cyan Worlds, Inc.)"
static void IAboutDialog(QWidget *parent)
{
QDialog dlg(parent);
QLabel *image = new QLabel(&dlg);
image->setPixmap(QPixmap(":/icon1.ico"));
QLabel *text = new QLabel(QObject::tr(ABOUT_TEXT), &dlg);
QLabel *text = new QLabel(QObject::tr(R"(plLocalizationEditor
A basic editor for Plasma 21 localization resource files
Copyright (C) 2004 Cyan Worlds, Inc.)"), &dlg);
QPushButton *ok = new QPushButton(QObject::tr("OK"), &dlg);
ok->setDefault(true);

Loading…
Cancel
Save