Qt4 compatibility

This commit is contained in:
Matthias Koefferlein 2022-05-16 00:07:31 +02:00
parent 0a6ac1a226
commit d8f51a5ef0
5 changed files with 12 additions and 21 deletions

View File

@ -14,11 +14,6 @@ jobs:
vmImage: 'windows-2019' # other options: 'macOS-10.13', 'ubuntu-16.04'
strategy:
matrix:
# Python27:
# python.version: '2.7'
# cp35-cp35m-win_amd64.whl:
# python.version: '3.5'
# python.architecture: 'x64'
cp36-cp36m-win_amd64.whl:
python.version: '3.6'
python.architecture: 'x64'
@ -34,9 +29,6 @@ jobs:
cp310-cp310-win_amd64.whl:
python.version: '3.10'
python.architecture: 'x64'
# cp35-cp35m-win32.whl:
# python.version: '3.5'
# python.architecture: 'x86'
cp36-cp36m-win32.whl:
python.version: '3.6'
python.architecture: 'x86'
@ -81,15 +73,6 @@ jobs:
#workingDirectory: # Optional
displayName: 'Download and Extract KLayout bits'
# - script: |
# curl https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -o VCForPython27.msi
# msiexec /i VCForPython27.msi /quiet
# set "VS90COMNTOOLS=C:\Users\VssAdministrator\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC"
# curl https://raw.githubusercontent.com/mattn/gntp-send/master/include/msinttypes/stdint.h -o "%VS90COMNTOOLS%\Include\stdint.h"
# dir "%VS90COMNTOOLS%\Include"
# condition: eq(variables['python.version'], '2.7')
# displayName: 'Install Microsoft Visual C++ Compiler for Python 2.7'
- script: |
python -m pip install --upgrade pip setuptools wheel
displayName: 'Update pip, setuptools and wheel'
@ -107,11 +90,13 @@ jobs:
- script: |
echo PATH=%PATH%
set TESTSRC=.
pip install klayout --no-index -f dist
python testdata/pymod/import_db.py
python testdata/pymod/import_rdb.py
python testdata/pymod/import_tl.py
python testdata/pymod/import_lib.py
python testdata/pymod/import_lay.py
python testdata/pymod/pya_tests.py
displayName: 'Test KLayout pymod'

View File

@ -290,7 +290,11 @@ QImage
PixelBuffer::to_image_copy () const
{
QImage img (m_width, m_height, m_transparent ? QImage::Format_ARGB32 : QImage::Format_RGB32);
#if QT_VERSION < 0x050000
memcpy (img.bits (), data (), img.byteCount ());
#else
memcpy (img.bits (), data (), img.sizeInBytes ());
#endif
return img;
}
@ -703,7 +707,11 @@ QImage
BitmapBuffer::to_image_copy () const
{
QImage img (m_width, m_height, QImage::Format_MonoLSB);
#if QT_VERSION < 0x050000
memcpy (img.bits (), data (), img.byteCount ());
#else
memcpy (img.bits (), data (), img.sizeInBytes ());
#endif
return img;
}

View File

@ -25,8 +25,6 @@
#ifndef HDR_layCellSelectionForm
#define HDR_layCellSelectionForm
#include <QAction>
#include "layuiCommon.h"
#include "layCellView.h"
#include "tlDeferredExecution.h"
@ -34,7 +32,9 @@
#include <vector>
#include <string>
#include <QAction>
#include <QDialog>
#include <QModelIndex>
namespace Ui
{

View File

@ -16,7 +16,6 @@ SOURCES = \
HEADERS = \
lymCommon.h \
lymForceLink.h \
lymInclude.h \
lymMacroInterpreter.h \
lymMacroCollection.h \
lymMacro.h \

View File

@ -23,4 +23,3 @@
#include "../pymodHelper.h"
DEFINE_PYMOD(tlcore, "tl", "KLayout core module 'tl'")