Update Dependency Versions and fixed deprecated features

This commit is contained in:
Tyler Crandall 2020-04-02 03:02:01 -06:00
parent 1822edb88d
commit 271da0c901
7 changed files with 33 additions and 44 deletions
dub.json
src/dlangui

View File

@ -50,11 +50,11 @@
"versions-windows": ["Unicode"],
"libs-windows": ["opengl32"],
"dependencies": {
"derelict-gl3": "~>2.0.0-beta.7",
"derelict-ft": "~>2.0.0-beta.4"
"derelict-gl3": "~>2.0.0-beta.8",
"derelict-ft": "~>2.0.0-beta.5"
},
"dependencies-posix": {
"derelict-sdl2": "~>3.0.0-beta.7"
"derelict-sdl2": "~>3.0.0-beta.8"
},
"copyFiles-windows-x86_64": [
"libs/windows/x86_64/libfreetype-6.dll"
@ -73,8 +73,8 @@
"versions": ["USE_EXTERNAL"],
"libs-windows": ["opengl32"],
"dependencies": {
"derelict-gl3": "~>2.0.0-beta.7",
"derelict-ft": "~>2.0.0-beta.4"
"derelict-gl3": "~>2.0.0-beta.8",
"derelict-ft": "~>2.0.0-beta.5"
}
},
{
@ -84,9 +84,9 @@
"versions-windows": ["Unicode" ,"NO_OPENGL"],
"libs-windows": ["opengl32"],
"dependencies-posix": {
"derelict-gl3": "~>2.0.0-beta.7",
"derelict-sdl2": "~>3.0.0-beta.7",
"derelict-ft": "~>2.0.0-beta.4"
"derelict-gl3": "~>2.0.0-beta.8",
"derelict-sdl2": "~>3.0.0-beta.8",
"derelict-ft": "~>2.0.0-beta.5"
}
},
{
@ -94,9 +94,9 @@
"versions": ["USE_SDL", "USE_OPENGL", "USE_FREETYPE", "EmbedStandardResources"],
"versions-windows": ["Unicode"],
"dependencies": {
"derelict-gl3": "~>2.0.0-beta.7",
"derelict-ft": "~>2.0.0-beta.4",
"derelict-sdl2": "~>3.0.0-beta.7"
"derelict-gl3": "~>2.0.0-beta.8",
"derelict-ft": "~>2.0.0-beta.5",
"derelict-sdl2": "~>3.0.0-beta.8"
},
"copyFiles-windows-x86_64": [
"libs/windows/x86_64/libfreetype-6.dll",
@ -112,9 +112,9 @@
"versions": ["USE_X11", "USE_FREETYPE", "EmbedStandardResources"],
"versions-windows": ["Unicode"],
"dependencies": {
"derelict-gl3": "~>2.0.0-beta.7",
"derelict-ft": "~>2.0.0-beta.4",
"x11": "~>1.0.17"
"derelict-gl3": "~>2.0.0-beta.8",
"derelict-ft": "~>2.0.0-beta.5",
"x11": "~>1.0.21"
}
},
{

View File

@ -489,7 +489,7 @@ final class Setting {
/// read as string value
@property inout(string) str() inout {
@property string str() {
final switch(_type) with(SettingType) {
case STRING:
return _store.str;
@ -510,7 +510,7 @@ final class Setting {
}
}
/// read as string value
inout(string) strDef(string defValue) inout {
string strDef(string defValue) {
final switch(_type) with(SettingType) {
case STRING:
return _store.str;

View File

@ -363,19 +363,8 @@ class FileDialog : Dialog, CustomGridCellAdapter {
protected string formatTimestamp(ref DirEntry f) {
import std.datetime : SysTime;
import std.typecons : Nullable;
Nullable!SysTime ts;
try {
ts = f.timeLastModified;
} catch (Exception e) {
Log.w(e.msg);
}
if (ts.isNull) {
return "----.--.-- --:--";
} else {
//date = "%04d.%02d.%02d %02d:%02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second);
return "%04d.%02d.%02d %02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute);
}
SysTime ts = f.timeLastModified;
return "%04d.%02d.%02d %02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute);
}
protected int entriesToCells(string selectedItemPath) {

View File

@ -81,16 +81,16 @@ struct CSSToken {
string text;
string dimensionUnit;
union {
struct {
long intValue = 0; /// for number and dimension
double doubleValue = 0; /// for number and dimension
bool typeFlagInteger; /// for number and dimension - true if number is integer, false if double
}
struct {
uint unicodeRangeStart; /// for unicodeRange (initialized to 0 via intValue=0)
uint unicodeRangeEnd; /// for unicodeRange (initialized to 0 via intValue=0)
}
bool typeFlagId; // true if identifier is valid ID
struct {
long intValue = 0; // for number and dimension
double doubleValue = 0; // for number and dimension
bool typeFlagInteger; // for number and dimension - true if number is integer, false if double
}
struct {
uint unicodeRangeStart; // for unicodeRange (initialized to 0 via intValue=0)
uint unicodeRangeEnd; // for unicodeRange (initialized to 0 via intValue=0)
}
}
}

View File

@ -538,7 +538,7 @@ class FreeTypeFontManager : FontManager {
FontFileItem best = null;
int bestScore = 0;
string[] faces = face ? split(face, ",") : null;
foreach(int index, FontFileItem item; _fontFiles) {
foreach(size_t index, FontFileItem item; _fontFiles) {
int score = 0;
int bestFaceMatch = 0;
if (faces && face.length) {

View File

@ -120,7 +120,7 @@ bool visit(Node3d node, bool delegate(Node3d node) visitor) {
if (res)
return true;
foreach(child; node.children) {
bool res = visit(child, visitor);
res = visit(child, visitor);
if (res)
return true;
}

View File

@ -3446,11 +3446,11 @@ class EditBox : EditWidgetBase {
rc.offset(0, yOffset);
Rect[] wrappedSelection;
wrappedSelection.length = curSpan.len;
foreach (int i, wrapLineRect; wrappedSelection)
foreach (size_t i, wrapLineRect; wrappedSelection)
{
int startingDifference = rc.left - _clientRect.left;
wrapLineRect = rc;
wrapLineRect.offset(-1 * curSpan.accumulation(i, LineSpan.WrapPointInfo.Width), i * _lineHeight);
wrapLineRect.offset(-1 * curSpan.accumulation(cast(int)i, LineSpan.WrapPointInfo.Width), cast(int)i * _lineHeight);
wrapLineRect.right = limitNumber(wrapLineRect.right,(rc.left + curSpan.wrapPoints[i].wrapWidth) - startingDifference);
buf.fillRect(wrapLineRect, color);
}
@ -3796,9 +3796,9 @@ class EditBox : EditWidgetBase {
wrappedLine = _span[i].wrappedContent;
int accumulativeLength;
CustomCharProps[] wrapProps;
foreach (int q, curWrap; wrappedLine)
foreach (size_t q, curWrap; wrappedLine)
{
auto lineOffset = q + i + wrapsUpTo(i + _firstVisibleLine);
int lineOffset = cast(int)q + i + wrapsUpTo(i + _firstVisibleLine);
if (highlight)
{
wrapProps = highlight[accumulativeLength .. $];