diff --git a/uppsrc/CtrlCore/CocoApp.mm b/uppsrc/CtrlCore/CocoApp.mm index fa7517d70..078e3da13 100644 --- a/uppsrc/CtrlCore/CocoApp.mm +++ b/uppsrc/CtrlCore/CocoApp.mm @@ -227,7 +227,9 @@ void Ctrl::GuiSleep(int ms) { ASSERT(IsMainThread()); sGuiSleep = true; + int n = LeaveGuiMutexAll(); GetNextEvent([NSDate dateWithTimeIntervalSinceNow:ms / 1000.0]); + EnterGuiMutex(n); sGuiSleep = false; } diff --git a/uppsrc/CtrlCore/CocoImage.mm b/uppsrc/CtrlCore/CocoImage.mm index ba944324e..ee5cfd5ae 100644 --- a/uppsrc/CtrlCore/CocoImage.mm +++ b/uppsrc/CtrlCore/CocoImage.mm @@ -290,7 +290,7 @@ void Ctrl::SetNSAppImage(const Image& img) void Ctrl::SetMouseCursor(const Image& img) { if(GetDragAndDropSource()) - return; + return; int64 h = img.GetAuxData(); if(h) { [GetNSCursor(h) set]; diff --git a/uppsrc/CtrlCore/CtrlMt.cpp b/uppsrc/CtrlCore/CtrlMt.cpp index 41748695f..b12e982dd 100644 --- a/uppsrc/CtrlCore/CtrlMt.cpp +++ b/uppsrc/CtrlCore/CtrlMt.cpp @@ -1,6 +1,6 @@ #include "CtrlCore.h" -#define LLOG(x) // DLOG(x) +#define LLOG(x) // DLOG(x) namespace Upp { diff --git a/uppsrc/RichText/ParaPaint.cpp b/uppsrc/RichText/ParaPaint.cpp index 1b5a21555..d212d22bf 100644 --- a/uppsrc/RichText/ParaPaint.cpp +++ b/uppsrc/RichText/ParaPaint.cpp @@ -194,7 +194,6 @@ void RichPara::Paint(PageDraw& pw, RichContext rc, const PaintInfo& pi, pi.DrawSelection(pw.Page(p), z * rc.page.left, top, z * rc.page.right - z * rc.page.left, bottom - top); } opy = rc.py; - int oi = 0; int x = 0; int y0 = 0; int lineascent = 0; @@ -375,8 +374,6 @@ void RichPara::Paint(PageDraw& pw, RichContext rc, const PaintInfo& pi, } else while(i < ilim) { - if(hg->object) - oi++; i++; hg++; } diff --git a/uppsrc/ide/clang/clang.cpp b/uppsrc/ide/clang/clang.cpp index 786ec90ce..3fa68d97e 100644 --- a/uppsrc/ide/clang/clang.cpp +++ b/uppsrc/ide/clang/clang.cpp @@ -80,6 +80,7 @@ bool Clang::Parse(const String& filename_, const String& content, dword options, const String& filename2, const String& content2) { + LLOG("Parse " << filename_); if(!HasLibClang()) return false; @@ -88,25 +89,12 @@ bool Clang::Parse(const String& filename_, const String& content, Dispose(); - String cmdline; - String filename = filename_; if((options & PARSE_FILE) && GetFileExt(filename) == ".icpp") { String src = "#include \"" + filename + "\""; filename = CacheFile(GetFileName(filename) + "$" + SHA1String(src) + ".cpp"); SaveChangedFile(filename, src); } - - cmdline << filename << " -DflagDEBUG -DflagDEBUG_FULL -DflagMAIN -DflagCLANG "; - - if(IsCppSourceFile(filename)) - cmdline << " -std=c++14 -xc++ " << LibClangCommandLine() << " "; - else - cmdline << " -xc " << LibClangCommandLineC() << " "; - - String cmdline0 = cmdline; - - cmdline << RedefineMacros() << " "; String includes = includes_; MergeWith(includes, ";", GetClangInternalIncludes()); @@ -124,6 +112,19 @@ bool Clang::Parse(const String& filename_, const String& content, for(const String& s : Split(defines + ";CLANG", ';')) args.Add("-D" + s); + String cmdline; + + if(IsCppSourceFile(filename)) + cmdline << " -std=c++14 -xc++ " << LibClangCommandLine() << " "; + else + cmdline << " -xc " << LibClangCommandLineC() << " "; + + cmdline << " -DflagDEBUG -DflagDEBUG_FULL -DflagMAIN -DflagCLANG " << filename; + + String cmdline0 = cmdline; + + cmdline << RedefineMacros() << " "; + args.Append(Split(cmdline, ' ')); Vector argv; @@ -142,7 +143,7 @@ bool Clang::Parse(const String& filename_, const String& content, if(!tu) PutAssist("Failed commandline: " + cmdline0); -// DumpDiagnostics(tu); + // Diagnostics(tu, VppLog());_DBG_ return tu; } @@ -150,6 +151,8 @@ bool Clang::Parse(const String& filename_, const String& content, bool Clang::ReParse(const String& filename, const String& content, const String& filename2, const String& content2) { + LLOG("ReParse " << filename); + if(!HasLibClang()) return false; diff --git a/uppsrc/ide/clang/libclang.cpp b/uppsrc/ide/clang/libclang.cpp index d80748b81..3c1d29f06 100644 --- a/uppsrc/ide/clang/libclang.cpp +++ b/uppsrc/ide/clang/libclang.cpp @@ -23,7 +23,7 @@ bool LoadLibClang0(const char *dir, const char *file) bool LoadLibClang(const char *dir) { -#ifdef PLATFORM_MACOS0 // it does not seem to work for some reason, block it for now +#ifdef PLATFORM_MACOS // it does not seem to work for some reason, block it for now if(LoadLibClang0(dir, "libclang.dylib")) return true; #endif