U++: Issueshttps://www.ultimatepp.org/redmine/https://www.ultimatepp.org/redmine/redmine/favicon.ico2017-04-22T11:24:59ZRedmine
Redmine Feature #1689 (Approved): Add LZ4 compression to brc filehttps://www.ultimatepp.org/redmine/issues/16892017-04-22T11:24:59ZAbdelghani Omariab.omari@gmail.com
<p>patch:<br />ide/Core/Core.h, line 509 : add ENC_LZ4 to the enum:<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">enum</span> {
ENC_PLAIN,
ENC_ZIP,
ENC_BZ2,
ENC_LZ4,
};
</span></code></pre></p>
<p>ide/Core/BinObj.cpp, Line 37, Add this block "else if":<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">else</span> <span class="keyword">if</span>(binscript.Id(<span class="string"><span class="delimiter">"</span><span class="content">LZ4</span><span class="delimiter">"</span></span>))
blk.encoding = Block::ENC_LZ4;
</span></code></pre></p>
<p>ide/Core/Core.cpp <br /> add this "case" at lines 466 & 506:<br /><pre><code class="cpp syntaxhl"><span class="CodeRay"> <span class="keyword">case</span> BinObjInfo::Block::ENC_LZ4: data = LZ4Compress(data); <span class="keyword">break</span>;
</span></code></pre><br /> And at line 2 : <br /><pre><code class="cpp syntaxhl"><span class="CodeRay"><span class="preprocessor">#include</span> <span class="include"><plugin/lz4/lz4.h></span>
</span></code></pre></p>
<p>finally, in order to simplify decompression, add this util overload in:<br />plugin/lz4/lz4:<br /><pre><code class="cpp syntaxhl"><span class="CodeRay">String LZ4Decompress(Stream& in, Gate<int64, int64> progress)
{
StringStream out;
LZ4Decompress(out, in, progress);
<span class="keyword">return</span> out;
}
</span></code></pre></p> Bug #1686 (Approved): On some machines (my own computer) ide menu bar entry to disable state with...https://www.ultimatepp.org/redmine/issues/16862017-04-20T21:17:12ZZbigniew Rebacz
<p>Some time to time I noticed that help icon is disabled on the menu bar. The fix here is simply and it is realted to the CtrlLib, on of the method should explicitly call Enable(true) to fix that issue. Mirek, please check and let me know it is OK. More information in diff.</p> Bug #1609 (Approved): CodeEditor dosen't highlight unsigned numbershttps://www.ultimatepp.org/redmine/issues/16092017-01-06T21:57:04ZZbigniew Rebacz
<p>Hard-coded unsigned values for example 0u is not highlighted.<br /><pre><code class="cpp syntaxhl"><span class="CodeRay">size_t size = <span class="integer">0</span>u;
</span></code></pre></p> Feature #1601 (Approved): CParser nested comment supporthttps://www.ultimatepp.org/redmine/issues/16012017-01-03T11:33:41Zcbpporter cbpporterBug #1600 (Approved): CParser::IsNumber can return wrong resulthttps://www.ultimatepp.org/redmine/issues/16002017-01-03T11:24:27Zcbpporter cbpporter
<p>CParser::IsNumber takes a base parameter, so I interpreted the function as being designed as "is the contents of the stream in the parser a number using base XXX?".</p>
<p>If this assertion is true, IsNumber(8) on a stream with the contents "9 ..." will return true, which should be false.</p>
<p>Fix:</p>
<pre>
bool CParser::IsNumber(int base) const
{
if(IsDigit(*term)) {
int q = *term - '0';
return q >= 0 && q < base;
}
else {
int q = ToUpper(*term) - 'A';
return q >= 0 && q < base - 10;
}
}
</pre>
<p>The fix is a bit slower, but I doubt this will have real life impact.</p> Feature #1599 (Approved): Small addition to TabBarhttps://www.ultimatepp.org/redmine/issues/15992017-01-03T10:50:06Zcbpporter cbpporter
<p>When designing GUIs, a lot of small frames and spacing is used for aesthetics.</p>
<p>You often create a "border" of indents around some GUI element to highlight it. The border I'm designing is broken by TabCtrl's scrollbar.</p>
<p>With TabBar::AddFrameToScroolBar:<br /><pre>
void AddFrameToScroolBar(CtrlFrame& fr) { sc.AddFrame(fr); }
</pre><br />one can shift the scrollbar around and add borders to it.</p>
<p>Very minor issue, the difference is only a few pixels, but aesthetics is aesthetics...</p> Bug #1490 (Approved): Semicolon at the end of END_NAMESPACE_UPP is redurdanthttps://www.ultimatepp.org/redmine/issues/14902016-07-02T18:13:44ZZbigniew Rebacz
<p>The is not need to have semicolon at the end of namespace, so it should be removed from END_UPP_NAMESPACE</p>
<p>This should fix warning when -Wall flag is enable for GCC:<br /><pre>
#define END_UPP_NAMESPACE };
</pre></p>
<p>Should be<br /><pre>
#define END_UPP_NAMESPACE }
</pre></p> Feature #1028 (Approved): Function-like templateshttps://www.ultimatepp.org/redmine/issues/10282015-03-27T21:16:42ZJan Dolinárdolik.rce@gmail.com
<p>Several times lately, I found myself in a situation when I needed to render similar code in witz template multiple times, but with slightly different visuals or content. To do it easily, I wrote myself this little witz function:</p>
<pre>
Value Render(const Vector<Value>& arg, const Renderer *r) {
if (arg.GetCount() < 1)
return "";
// create new Renderer, as we can not modify the one currently used
Renderer rr;
// copy variables so they are avalable in the rendered template too
for(int i = 1; i < r->Variables().GetCount(); i++) {
rr(r->Variables().GetKey(i), r->Variables()[i]);
}
// add arguments as variables
for(int i = 1; i < arg.GetCount(); i++) {
rr("_"+IntStr(i), arg[i]);
}
// render the template passed in first argument
return rr.Render(AsString(arg[0]));
}
INITBLOCK {
Compiler::Register("render", Render);
};
</pre>
<p>The usage is simple, I just have a template which uses $_1, $_2, etc. for the variable arguments and in the main template I call it as a function, e.g. $render("MyApp/mytable.witz", "MyHeader", $CONF.TABLE1_BGCOLOR, $TABLE1_CONTENT).</p>
<p>I know this can probably be done using includes and defines in witz, but this way it feels much more natural and also the syntax is much simpler to write. Also, the function might be simpler and more efficient if implemented directly in Skylark, it might be possible to avoid creating brand new renderer or at least copy the variables more efficiently.</p>
<p>If you think this might be of interest to other people, you can add it to the Skylark/stdlib.icpp. If you think it's stupid idea, just close this issue :)</p> Bug #851 (Approved): TheIDE fails to compile on Ubuntu 10.04https://www.ultimatepp.org/redmine/issues/8512014-09-09T08:41:02ZJan Dolinárdolik.rce@gmail.com
<p>Nightly builds on Lucid fail with this error:<br /><pre>
Compiling /build/buildd/upp-7653/uppsrc/ide/Virtuals.cpp
/build/buildd/upp-7653/uppsrc/ide/Navigator.cpp: In member function 'virtual void Navigator::NavigatorDisplay::PaintBackground(Upp::Draw&, const Upp::Rect&, const Upp::Value&, Upp::Color, Upp::Color, Upp::dword) const':
/build/buildd/upp-7653/uppsrc/ide/Navigator.cpp:306: error: no matching function for call to 'findarg(const Upp::byte&, Navigator::<anonymous enum>, Navigator::<anonymous enum>)'
/build/buildd/upp-7653/uppsrc/ide/Navigator.cpp: In member function 'int Navigator::NavigatorDisplay::DoPaint(Upp::Draw&, const Upp::Rect&, const Upp::Value&, Upp::Color, Upp::Color, Upp::dword) const':
/build/buildd/upp-7653/uppsrc/ide/Navigator.cpp:326: error: no matching function for call to 'findarg(const Upp::byte&, Navigator::<anonymous enum>, Navigator::<anonymous enum>)'
/build/buildd/upp-7653/uppsrc/ide/Navigator.cpp: In member function 'void Navigator::ListLineEnabled(int, bool&)':
/build/buildd/upp-7653/uppsrc/ide/Navigator.cpp:607: error: no matching function for call to 'findarg(int&, Navigator::<anonymous enum>, Navigator::<anonymous enum>)'
Compiling /build/buildd/upp-7653/uppsrc/ide/Thisbacks.cpp
</pre></p>
<p>Full log: <a class="external" href="https://launchpadlibrarian.net/184367908/buildlog_ubuntu-lucid-amd64.upp_7653-1~lucid0_FAILEDTOBUILD.txt.gz">https://launchpadlibrarian.net/184367908/buildlog_ubuntu-lucid-amd64.upp_7653-1~lucid0_FAILEDTOBUILD.txt.gz</a></p>
<p>Note that this old distribution is not supported on desktop anymore, only server. So if fixing it looks like too much pain, I can simply stop building the packages for it. I guess no one uses it anymore anyway...</p> Bug #834 (Approved): Core/xml.cpp, lines 519 and 525: replace "'\' with just "'https://www.ultimatepp.org/redmine/issues/8342014-08-19T11:54:46ZIñaki Zabalakoldo.ramirez@gmail.comBug #620 (Approved): Undefined variables in GtkKeyshttps://www.ultimatepp.org/redmine/issues/6202013-12-29T09:13:03ZJan Dolinárdolik.rce@gmail.com
<p>In latest nightly builds (6698 and 6702) on Ubuntu 10.04 Lucid Lynx, there is a problem when building TheIDE:<br /><pre>
In file included from uppsrc/CtrlCore/MKeys.h:3,
from uppsrc/CtrlCore/CtrlCore.h:81,
from /build/buildd/upp-6702/uppsrc/CtrlLib/CtrlLib.h:4,
from /build/buildd/upp-6702/uppsrc/CtrlLib/CtrlLib.icpp:1:
uppsrc/CtrlCore/GtkKeys.h:12: error: 'GDK_KEY_Delete' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:14: error: 'GDK_KEY_Shift_L' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:15: error: 'GDK_KEY_Control_L' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:16: error: 'GDK_KEY_Alt_L' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:17: error: 'GDK_KEY_Caps_Lock' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:18: error: 'GDK_KEY_Page_Up' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:19: error: 'GDK_KEY_Page_Up' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:20: error: 'GDK_KEY_Page_Down' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:21: error: 'GDK_KEY_Page_Down' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:22: error: 'GDK_KEY_End' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:23: error: 'GDK_KEY_Home' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:24: error: 'GDK_KEY_Left' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:25: error: 'GDK_KEY_Up' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:26: error: 'GDK_KEY_Right' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:27: error: 'GDK_KEY_Down' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:28: error: 'GDK_KEY_Insert' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:30: error: 'GDK_KEY_KP_0' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:31: error: 'GDK_KEY_KP_1' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:32: error: 'GDK_KEY_KP_2' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:33: error: 'GDK_KEY_KP_3' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:34: error: 'GDK_KEY_KP_4' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:35: error: 'GDK_KEY_KP_5' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:36: error: 'GDK_KEY_KP_6' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:37: error: 'GDK_KEY_KP_7' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:38: error: 'GDK_KEY_KP_8' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:39: error: 'GDK_KEY_KP_9' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:40: error: 'GDK_KEY_KP_Multiply' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:41: error: 'GDK_KEY_KP_Add' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:42: error: 'GDK_KEY_KP_Separator' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:43: error: 'GDK_KEY_KP_Subtract' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:44: error: 'GDK_KEY_KP_Decimal' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:45: error: 'GDK_KEY_KP_Divide' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:47: error: 'GDK_KEY_Scroll_Lock' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:49: error: 'GDK_KEY_F1' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:50: error: 'GDK_KEY_F2' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:51: error: 'GDK_KEY_F3' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:52: error: 'GDK_KEY_F4' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:53: error: 'GDK_KEY_F5' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:54: error: 'GDK_KEY_F6' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:55: error: 'GDK_KEY_F7' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:56: error: 'GDK_KEY_F8' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:57: error: 'GDK_KEY_F9' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:58: error: 'GDK_KEY_F10' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:59: error: 'GDK_KEY_F11' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:60: error: 'GDK_KEY_F12' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:62: error: 'GDK_KEY_A' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:63: error: 'GDK_KEY_B' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:64: error: 'GDK_KEY_C' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:65: error: 'GDK_KEY_D' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:66: error: 'GDK_KEY_E' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:67: error: 'GDK_KEY_F' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:68: error: 'GDK_KEY_G' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:69: error: 'GDK_KEY_H' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:70: error: 'GDK_KEY_I' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:71: error: 'GDK_KEY_J' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:72: error: 'GDK_KEY_K' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:73: error: 'GDK_KEY_L' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:74: error: 'GDK_KEY_M' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:75: error: 'GDK_KEY_N' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:76: error: 'GDK_KEY_O' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:77: error: 'GDK_KEY_P' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:78: error: 'GDK_KEY_Q' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:79: error: 'GDK_KEY_R' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:80: error: 'GDK_KEY_S' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:81: error: 'GDK_KEY_T' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:82: error: 'GDK_KEY_U' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:83: error: 'GDK_KEY_V' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:84: error: 'GDK_KEY_W' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:85: error: 'GDK_KEY_X' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:86: error: 'GDK_KEY_Y' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:87: error: 'GDK_KEY_Z' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:88: error: 'GDK_KEY_0' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:89: error: 'GDK_KEY_1' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:90: error: 'GDK_KEY_2' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:91: error: 'GDK_KEY_3' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:92: error: 'GDK_KEY_4' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:93: error: 'GDK_KEY_5' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:94: error: 'GDK_KEY_6' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:95: error: 'GDK_KEY_7' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:96: error: 'GDK_KEY_8' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:97: error: 'GDK_KEY_9' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:99: error: 'GDK_KEY_bracketleft' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:100: error: 'GDK_KEY_bracketright' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:101: error: 'GDK_KEY_minus' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:102: error: 'GDK_KEY_grave' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:103: error: 'GDK_KEY_slash' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:104: error: 'GDK_KEY_backslash' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:105: error: 'GDK_KEY_comma' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:106: error: 'GDK_KEY_period' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:107: error: 'GDK_KEY_semicolon' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:108: error: 'GDK_KEY_equal' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:109: error: 'GDK_KEY_apostrophe' was not declared in this scope
uppsrc/CtrlCore/GtkKeys.h:111: error: 'GDK_KEY_Break' was not declared in this scope
</pre></p>
<p>Full log: <a class="external" href="https://launchpadlibrarian.net/160977137/buildlog_ubuntu-lucid-amd64.upp_6702-1~lucid0_FAILEDTOBUILD.txt.gz">https://launchpadlibrarian.net/160977137/buildlog_ubuntu-lucid-amd64.upp_6702-1~lucid0_FAILEDTOBUILD.txt.gz</a></p>
<p>I'd suggest to drop support for Lucid, it is over 3 years old system and this is not a first time it causes problems. The official end of life date is coming soon anyway - <a href="https://wiki.ubuntu.com/Releases" class="external">in April</a>.</p> Bug #617 (Approved): LRUCache::GetFoundSize always returns zerohttps://www.ultimatepp.org/redmine/issues/6172013-12-27T20:35:56ZJan Dolinárdolik.rce@gmail.com
<p>I don't really understand the code in LRUCache, especially the reasons behind flag and Item::flag. But I strongly suspect there is some bug in the code in <a href="http://www.ultimatepp.org/redmine/projects/upp/repository/entry/trunk/uppsrc/Core/Other.h#L506" class="external">LRUCache<T, K>::Get</a> that takes care about incrementing the foundsize counter. Right now it probably only counts each retrieval once and even after ClearCounters was called. That doesn't really match the description.</p>
<p>As I already said, I don't really understand the logic that lead to using the flag variables :-) Nevertheless, I attach a patch eliminates them and that also seems to make the LRUCache behave as documented. Of course, if you can think of better solution, I won't mind :)</p> Bug #489 (Approved): Missing #undefs in MySqlSchema.hhttps://www.ultimatepp.org/redmine/issues/4892013-06-30T19:18:58ZJan Dolinárdolik.rce@gmail.com
<p>There are some macros which are not undefined in the MySqlSchema.h. It is mostly cosmetic problem, as it only results in warning and even that only in special case of including more than one schema. So the patch is mostly intended just to keep the code consistent :-)</p> Bug #177 (Rejected): CodeEditor: Consider fixing incorrect braces in syntax highlightinghttps://www.ultimatepp.org/redmine/issues/1772011-11-19T19:01:16ZSender Ghost
<p><a class="issue tracker-1 status-8 priority-6 priority-high2 closed" href="https://www.ultimatepp.org/redmine/issues/165" title="CodeEditor: incorrect refresh with scope highlighting enabled (Approved)">#165</a></p> Bug #167 (Approved): Native connection to MySql tutorialhttps://www.ultimatepp.org/redmine/issues/1672011-11-11T20:42:16ZJan Dolinárdolik.rce@gmail.com
<p>http://www.ultimatepp.org/forum/index.php?t=msg&goto=34308</p>
<p>Tutorial in form of tpp as well as a package is enclosed. I changed the code a bit, to be simpler to use, so please check if it still works as intended...</p>