- creates a “Bitcoin (testnet).lnk” when on testnet or a “Bitcoin (regtest).lnk, when on regtest
- fixes #5778
[Qt] honor current network when creating autostart link #5793
pull Diapolo wants to merge 2 commits into bitcoin:master from Diapolo:testnet-startup changing 1 files +35 −11-
Diapolo commented at 8:42 pm on February 14, 2015: none
-
Diapolo renamed this:
[Qt] honor testnet when creating autostart link on Windows
[Qt] honor testnet when creating autostart links
on Feb 15, 2015 -
Diapolo commented at 3:30 pm on February 15, 2015: noneHopefully fixed the Travis build and also added the change for Linux (needs testing).
-
in src/qt/guiutil.cpp: in a1dd65899b outdated
599@@ -597,20 +600,33 @@ bool SetStartOnSystemStartup(bool fAutoStart) 600 TCHAR pszExePath[MAX_PATH]; 601 GetModuleFileName(NULL, pszExePath, sizeof(pszExePath)); 602 603- TCHAR pszArgs[5] = TEXT("-min"); 604+ // Start client minimized 605+ QString strArgs = "-min"; 606+ // Start testnet client, if we are currently running testnet 607+ if (Params().NetworkIDString() == "test")
laanwj commented at 5:39 am on February 17, 2015:You could generalize this by passing the current value of testnet, or even regtest to the link,
0strprintf("-testnet=%d -regtest=%d", GetBoolArg("-testnet"), GetBoolArg("-regtest"))
Not that I think there is much use in an autostarting regtest instance.
laanwj commented at 9:58 am on February 19, 2015:If you do keep it like this based on special-casing the network name, make sure that you avoid doing anything if the net is notmain
ortest
laanwj commented at 9:45 am on February 18, 2015: memberFailing travis on windows
0 CXX qt/qt_libbitcoinqt_a-guiutil.o 1qt/guiutil.cpp: In function ‘bool GUIUtil::SetStartOnSystemStartup(bool)’: 2qt/guiutil.cpp:610:61: error: cannot convert ‘WCHAR* {aka wchar_t*}’ to ‘TCHAR* {aka char*}’ in initialization 3qt/guiutil.cpp:611:42: error: no matching function for call to ‘QString::toWCharArray(TCHAR*&)’ 4qt/guiutil.cpp:611:42: note: candidate is: 5/home/travis/build/bitcoin/bitcoin/depends/x86_64-w64-mingw32/include/QtCore/qstring.h:824:12: note: int QString::toWCharArray(wchar_t*) const 6/home/travis/build/bitcoin/bitcoin/depends/x86_64-w64-mingw32/include/QtCore/qstring.h:824:12: note: no known conversion for argument 1 from ‘TCHAR* {aka char*}’ to ‘wchar_t*’ 7make[2]: *** [qt/qt_libbitcoinqt_a-guiutil.o] Error 1 8make[2]: Leaving directory `/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-w64-mingw32/src' 9make[1]: *** [check-recursive] Error 1 10make[1]: Leaving directory `/home/travis/build/bitcoin/bitcoin/bitcoin-x86_64-w64-mingw32/src' 11make: *** [check-recursive] Error 1
laanwj added the label GUI on Feb 18, 2015Diapolo commented at 12:23 pm on February 18, 2015: noneYeah I already saw this… will need to rework :). Edit: Seems like some UNICODE and wchar_t problems…Diapolo commented at 1:58 pm on February 18, 2015: noneWho is able to test this :)?in src/qt/guiutil.cpp: in 55c1eb1591 outdated
607+ if (Params().NetworkIDString() == "test") 608+ strArgs += " -testnet"; 609+ 610+#ifdef UNICODE 611+ // Convert the QString to TCHAR* 612+ TCHAR* args = new TCHAR[strArgs.length() + 1];
laanwj commented at 10:10 am on February 19, 2015:We should use RAII here, could be done in various ways. Most obvious is boost::scoped_array, e.g.
0scoped_array<TCHAR> args (new TCHAR[strArgs.length() + 1]);
Another option would be going through std::wstring, e.g.
0std::wstring wstrArgs = strArgs.toStdWString(); 1TCHAR *args = W2T(wstrArgs.c_str());
In this case the manual appending of a NULL byte can be avoided, and the code can be shorter.
Diapolo renamed this:
[Qt] honor testnet when creating autostart links
[Qt] honor current network when creating autostart link
on Feb 19, 2015[Qt, Win] honor current network when creating autostart link
- creates a "Bitcoin (testnet).lnk" when on testnet or a "Bitcoin (regtest).lnk, when on regtest - fixes #5778
[Qt, Linux] honor current network when creating autostart link 6cb4a52535laanwj commented at 4:18 pm on February 26, 2015: memberutACKtykling commented at 3:57 pm on March 3, 2015: noneI have no means of building this, sorry, but from reviewing the code it appears to do exactly what is should :) Is there somewhere I can download the executable travis built and try that?jonasschnelli commented at 6:08 am on March 5, 2015: contributorTested ACK. Tested
regtest
andtestnet
(parallel). Checkbox also reacts correct if testnet/regtest link is already there.Binaries to test: https://builds.jonasschnelli.ch/pulls/5793/
After restart:
laanwj merged this on Mar 9, 2015laanwj closed this on Mar 9, 2015
laanwj referenced this in commit d26f0b263c on Mar 9, 2015Diapolo deleted the branch on Mar 9, 2015random-zebra referenced this in commit f15a1674ce on Feb 6, 2021MarcoFalke locked this on Sep 8, 2021
Diapolo laanwj tykling jonasschnelliLabels
GUI
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 06:12 UTC
More mirrored repositories can be found on mirror.b10c.me