This repository has been archived by the owner. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
brahma-dev/synergy-stable-builds
symless/synergy-core
Albicorp/synergy
AwesomeDoesIt/synergy
Bakalchuk/synergy
BogdanLivadariu/synergy
BorisChiou/synergy
Charcol/synergy
Coolred/synergy
Craigk109/synergy
DALDEI/synergy
DavidST44/synergy
DiegoSousa/synergy
DonnaWuDongxia/synergy
Dracophoenix1/synergy
Flare183/synergy
HerrGrumps/synergy
HomeTheaterOperatingSystem/synergy-core
Independent-Scientist/synergy
JaapSuter/synergy
JimDu/synergy
Joiningss/synergy
JoshMcCullough/synergy
KentVu/synergy
Lesthat/synergy
LiangChen0322/synergy
MarceColl/synergy
Mebus/synergy
MikeKnieriem/synergy
Nihil7354/synergy
OrangeUtan/synergy-stable-builds
ProjectLeaf/synergy
RaccoonTeam/synergy
RafalXXL/synergy
SeniorCoder1025/synergy
Sevea/synergy-1
SheaReinke/synergy
Toasterfist/synergy
UIKit0/synergy
Werror/synergy
Wkryst/synergy
XelaRellum/synergy
ahwagner/synergy
aladagli/synergy
alancapc/synergy
alex-deng/synergy
alexzzp/synergy
amitkr/synergy
andyesi/synergy
anthraxx/synergyunfuck
artisdom/synergy
artiya4u/synergy
astamatix/synergy
austin-laney/synergy
axela74/synergy
ballifatih/synergy
barisi/synergy
beedz/synergy
blnk2007/synergy
caramis/synergy
carballude/synergy
cardonator/synergy
carlosfvp/synergy
carstenlaengerer/synergy
cchwann/synergy
changdongsheng/synergy
chaomengnan/synergy
chedlin/synergy
chengguangnan/synergy
cjliu20152/synergy
clonkymonk/synergy
cribe78/synergy
dannon/synergy
darongE/synergy
davidchanff/synergy
dcrum/synergy
debauchee/barrier
deliangyang/synergy
dguerri/synergy
dijkstraj/synergy
divegeek/synergy
dpereira/synergy
dpolivy/synergy
duboisp/synergy
eaglecomp01/synergy
edwardsp/synergy
elitvinenko/synergy
fashioncj/synergy
fatdollar/synergy
fc205/synergy
feng-ye/synergy
fenggao86/synergy
fernandodeperto/synergy
frank-emrich/synergy
frankmanzhu/synergy
fuckobama/synergy
funixfu/synergy
fuzhuo/synergy
galkinvv/synergy
ghostreiter/synergy
gitscrubz/synergy
gtorressfdc/synergy
guangyue/synergy
hanks42/synergy
hanoseok/synergy
hcxiong/synergy
heathschweitzer/synergy
helkanen/synergy
hifi-dd/synergy
hoaluvn/synergy
hyei/synergy
iamcxa/synergy
ichengde/synergy
inche-ali/synergy
itchanges/synergy
iurnah/synergy
jcoming/synergy
jpmcmu/synergy
jpwhiting/synergy
julian-amaya/synergy
kaixinsoft/synergy
karolw/synergy
kash4kev/synergy
kellyhuberty/synergy
kissfu/synergy
kmrbrierley/synergy
ko7m/synergy
liuhuimin/synergy
lookat119/synergy
lukeqsun/synergy
makaanneo/synergy-1
margaritis/synergy
mcamiano/synergy
mcanthony/synergy
md11235/synergy
meowfaceman/synergy
midnite8177/synergy
moben/synergy
moodboom/synergy
museroom/synergy
neilmayhew/synergy
neuroradiology/synergy
nmadhok/synergy
noital/synergy
nyetwurk/synergy
ommokazza/synergy
onlymee/synergy
pdecat/synergy
peteo/synergy-stable-builds
phackss/synergy
piboye/synergy
ptg001/synergy
qbektrix/synergy
rajserc/synergy
ralluri/synergy
rmagnuson/synergy
saburahu/synergy
saiksy/synergy
sami1971/synergy
sarvex/synergy
scorpblog/synergy
sebpardo/synergy
serenemoon/synergy
shanesims/synergy
sharkpp/synergy
shaunliz/synergy
shawnanastasio/synergy
sl1pm4t/synergy
smittex/synergy
solokacher/synergy
songei/synergy-core
spurin/synergy
stelonix/synergy
stipid/synergy
terry2010/synergy
the-wes/synergy
thesoftwarejedi/synergy
timmui/synergy
tpraturi/synergy
utwodownson/synergy
vaginessa/synergy
whereyougo/synergy
willleslie/synergy
wjcsharp/synergy
wolrah/synergy
xiaoping378/synergy
xiyuanHou/synergy
xuerik/synergy
yajun0601/synergy
yangchengwork/synergy
yarec/synergy
ylluminate/synergy
yucheng82/synergy
yulin0629/synergy
yupi2/synergy
yyppaag/synergy
zbrode/synergy
zdndanny/synergy
zengyijie/synergy
zhanglongqi/synergy
Nothing to show
...
Choose a Head Repository
brahma-dev/synergy-stable-builds
symless/synergy-core
Albicorp/synergy
AwesomeDoesIt/synergy
Bakalchuk/synergy
BogdanLivadariu/synergy
BorisChiou/synergy
Charcol/synergy
Coolred/synergy
Craigk109/synergy
DALDEI/synergy
DavidST44/synergy
DiegoSousa/synergy
DonnaWuDongxia/synergy
Dracophoenix1/synergy
Flare183/synergy
HerrGrumps/synergy
HomeTheaterOperatingSystem/synergy-core
Independent-Scientist/synergy
JaapSuter/synergy
JimDu/synergy
Joiningss/synergy
JoshMcCullough/synergy
KentVu/synergy
Lesthat/synergy
LiangChen0322/synergy
MarceColl/synergy
Mebus/synergy
MikeKnieriem/synergy
Nihil7354/synergy
OrangeUtan/synergy-stable-builds
ProjectLeaf/synergy
RaccoonTeam/synergy
RafalXXL/synergy
SeniorCoder1025/synergy
Sevea/synergy-1
SheaReinke/synergy
Toasterfist/synergy
UIKit0/synergy
Werror/synergy
Wkryst/synergy
XelaRellum/synergy
ahwagner/synergy
aladagli/synergy
alancapc/synergy
alex-deng/synergy
alexzzp/synergy
amitkr/synergy
andyesi/synergy
anthraxx/synergyunfuck
artisdom/synergy
artiya4u/synergy
astamatix/synergy
austin-laney/synergy
axela74/synergy
ballifatih/synergy
barisi/synergy
beedz/synergy
blnk2007/synergy
caramis/synergy
carballude/synergy
cardonator/synergy
carlosfvp/synergy
carstenlaengerer/synergy
cchwann/synergy
changdongsheng/synergy
chaomengnan/synergy
chedlin/synergy
chengguangnan/synergy
cjliu20152/synergy
clonkymonk/synergy
cribe78/synergy
dannon/synergy
darongE/synergy
davidchanff/synergy
dcrum/synergy
debauchee/barrier
deliangyang/synergy
dguerri/synergy
dijkstraj/synergy
divegeek/synergy
dpereira/synergy
dpolivy/synergy
duboisp/synergy
eaglecomp01/synergy
edwardsp/synergy
elitvinenko/synergy
fashioncj/synergy
fatdollar/synergy
fc205/synergy
feng-ye/synergy
fenggao86/synergy
fernandodeperto/synergy
frank-emrich/synergy
frankmanzhu/synergy
fuckobama/synergy
funixfu/synergy
fuzhuo/synergy
galkinvv/synergy
ghostreiter/synergy
gitscrubz/synergy
gtorressfdc/synergy
guangyue/synergy
hanks42/synergy
hanoseok/synergy
hcxiong/synergy
heathschweitzer/synergy
helkanen/synergy
hifi-dd/synergy
hoaluvn/synergy
hyei/synergy
iamcxa/synergy
ichengde/synergy
inche-ali/synergy
itchanges/synergy
iurnah/synergy
jcoming/synergy
jpmcmu/synergy
jpwhiting/synergy
julian-amaya/synergy
kaixinsoft/synergy
karolw/synergy
kash4kev/synergy
kellyhuberty/synergy
kissfu/synergy
kmrbrierley/synergy
ko7m/synergy
liuhuimin/synergy
lookat119/synergy
lukeqsun/synergy
makaanneo/synergy-1
margaritis/synergy
mcamiano/synergy
mcanthony/synergy
md11235/synergy
meowfaceman/synergy
midnite8177/synergy
moben/synergy
moodboom/synergy
museroom/synergy
neilmayhew/synergy
neuroradiology/synergy
nmadhok/synergy
noital/synergy
nyetwurk/synergy
ommokazza/synergy
onlymee/synergy
pdecat/synergy
peteo/synergy-stable-builds
phackss/synergy
piboye/synergy
ptg001/synergy
qbektrix/synergy
rajserc/synergy
ralluri/synergy
rmagnuson/synergy
saburahu/synergy
saiksy/synergy
sami1971/synergy
sarvex/synergy
scorpblog/synergy
sebpardo/synergy
serenemoon/synergy
shanesims/synergy
sharkpp/synergy
shaunliz/synergy
shawnanastasio/synergy
sl1pm4t/synergy
smittex/synergy
solokacher/synergy
songei/synergy-core
spurin/synergy
stelonix/synergy
stipid/synergy
terry2010/synergy
the-wes/synergy
thesoftwarejedi/synergy
timmui/synergy
tpraturi/synergy
utwodownson/synergy
vaginessa/synergy
whereyougo/synergy
willleslie/synergy
wjcsharp/synergy
wolrah/synergy
xiaoping378/synergy
xiyuanHou/synergy
xuerik/synergy
yajun0601/synergy
yangchengwork/synergy
yarec/synergy
ylluminate/synergy
yucheng82/synergy
yulin0629/synergy
yupi2/synergy
yyppaag/synergy
zbrode/synergy
zdndanny/synergy
zengyijie/synergy
zhanglongqi/synergy
Nothing to show
Commits on Apr 06, 2015
Merge pull request #1 from synergy/master
pull from 4/6/2015 synergy/synergy repo
Commits on Mar 02, 2016
Commits on Jul 12, 2016
Commits on Jul 14, 2016
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Commits on Aug 08, 2016
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Will Tinsdeall Jerry (Xinyu Hou)
Will Tinsdeall and Jerry (Xinyu Hou)
Asbjorn Kjaer Jerry (Xinyu Hou)
Asbjorn Kjaer and Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
nlyan and Jerry (Xinyu Hou)
#5087 Ensure createBlankCursor() doesn't try to create 0x0 cursor
XQueryBestCursor sometimes returns 0 for both width and height of the
cursor pixmap. Also caused #5322 and #5068
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Jerry (Xinyu Hou)
Commits on Aug 30, 2016
Showing with 860 additions and 906 deletions.
  1. +2 −2 CMakeLists.txt
  2. +19 −0 ChangeLog
  3. +1 −1 ext/toolchain/commands1.py
  4. +58 −37 src/gui/res/SetupWizardBase.ui
  5. BIN src/gui/res/mac/Synergy.icns
  6. +6 −1 src/gui/src/ActivationNotifier.cpp
  7. +2 −1 src/gui/src/AppConfig.h
  8. +1 −0 src/gui/src/CommandProcess.h
  9. +12 −3 src/gui/src/MainWindow.cpp
  10. +1 −0 src/gui/src/MainWindow.h
  11. +4 −1 src/gui/src/SettingsDialog.cpp
  12. +10 −11 src/gui/src/SetupWizard.cpp
  13. +18 −7 src/lib/base/Log.cpp
  14. +0 −2 src/lib/base/Log.h
  15. +28 −27 src/lib/client/Client.cpp
  16. +0 −2 src/lib/client/ServerProxy.cpp
  17. +2 −2 src/lib/platform/CMakeLists.txt
  18. +189 −0 src/lib/platform/IOSXKeyResource.cpp
  19. +36 −0 src/lib/platform/IOSXKeyResource.h
  20. +8 −560 src/lib/platform/OSXKeyState.cpp
  21. +3 −53 src/lib/platform/OSXKeyState.h
  22. +21 −89 src/lib/platform/OSXScreen.cpp
  23. +4 −14 src/lib/platform/OSXScreen.h
  24. +296 −0 src/lib/platform/OSXUchrKeyResource.cpp
  25. +55 −0 src/lib/platform/OSXUchrKeyResource.h
  26. +4 −1 src/lib/platform/XWindowsScreen.cpp
  27. +2 −0 src/lib/platform/XWindowsUtil.cpp
  28. +0 −2 src/lib/server/ClientProxy1_6.cpp
  29. +14 −7 src/lib/server/Server.cpp
  30. +2 −1 src/lib/synergy/App.h
  31. +8 −8 src/lib/synergy/FileChunk.cpp
  32. +1 −5 src/lib/synergy/ProtocolUtil.cpp
  33. +1 −1 src/lib/synergy/ServerApp.cpp
  34. +32 −9 src/lib/synergy/StreamChunker.cpp
  35. +3 −1 src/lib/synergy/StreamChunker.h
  36. +1 −1 src/lib/synergy/ToolApp.cpp
  37. +3 −0 src/lib/synergy/mouse_types.h
  38. +4 −55 src/lib/synwinhk/synwinhk.cpp
  39. +9 −2 src/setup/win32/Product.wxs
View
@@ -17,8 +17,8 @@
# Version number for Synergy
set(VERSION_MAJOR 1)
set(VERSION_MINOR 8)
-set(VERSION_REV 1)
-set(VERSION_STAGE beta)
+set(VERSION_REV 2)
+set(VERSION_STAGE stable)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
cmake_minimum_required(VERSION 2.6)
View
@@ -1,3 +1,22 @@
+v1.8.2-stable
+=============
+Bug #3044 - Unable to drag-select in MS Office
+Bug #4768 - Copy paste causes 'server is dead' error on switching
+Bug #4792 - Server logging crashes when switching with clipboard data
+Bug #2975 - Middle click does not close Chrome tab on Mac client
+Bug #5087 - Linux client fails to start due to invalid cursor size
+Bug #5471 - Serial key textbox on activation screen overflows on Mac
+Bug #4836 - Stop button resets to Start when settings dialog canceled
+Enhancement #5277 - Auto restart service when synwinhk.dll fails on Windows
+Enhancement #4913 - Future-proof GUI login by using newer auth URL
+Enhancement #4922 - Add --enable-crypto argument to help text
+Enhancement #5299 - High resolution App icon on Mac
+Enhancement #4894 - Improve grammar in connection notification dialog
+
+v1.8.1-stable
+=============
+Bug #5461 - GUI crash during activation on Mac
+
v1.8.0-beta
=============
Enhancement #4696 - Include 'ns' plugin in installers (instead of wizard download)
@@ -1957,7 +1957,7 @@ def dist(self):
type = None
if len(self.args) > 0:
type = self.args[0]
-
+
self.ic.dist(type, self.vcRedistDir, self.qtDir)
def distftp(self):
@@ -125,10 +125,42 @@
<string>Activate</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Enable your &lt;a href=&quot;http://symless.com/pricing?source=gui&quot;&gt;Synergy Pro&lt;/a&gt; and Synergy Basic features.</string>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item>
<widget class="QRadioButton" name="m_pRadioButtonActivate">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
<property name="text">
- <string>Log in</string>
+ <string>&amp;Account login</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -164,7 +196,7 @@
<property name="minimumSize">
<size>
<width>200</width>
- <height>0</height>
+ <height>20</height>
</size>
</property>
<property name="echoMode">
@@ -190,7 +222,7 @@
<property name="minimumSize">
<size>
<width>200</width>
- <height>0</height>
+ <height>20</height>
</size>
</property>
<property name="echoMode">
@@ -201,7 +233,7 @@
<item row="2" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
- <string>&lt;a href=&quot;https://synergy-project.org/account/reset/&quot;&gt;Forgot password&lt;/a&gt;</string>
+ <string>&lt;a href=&quot;https://synergy-project.org/account/reset/?source=gui&quot;&gt;Forgot password&lt;/a&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
@@ -228,43 +260,19 @@
</item>
<item>
<widget class="QRadioButton" name="m_pRadioButtonSubscription">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
<property name="text">
- <string>Subscription</string>
+ <string>&amp;Serial key</string>
</property>
</widget>
</item>
<item>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="horizontalSpacing">
- <number>20</number>
- </property>
- <property name="verticalSpacing">
- <number>10</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Serial Key:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="m_pLineEditSerialKey">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>400</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QTextEdit" name="m_pTextEditSerialKey"/>
</item>
<item>
<spacer name="verticalSpacer_5">
@@ -285,7 +293,20 @@
<item>
<widget class="QRadioButton" name="m_pRadioButtonSkip">
<property name="text">
- <string>&amp;Skip activation</string>
+ <string>S&amp;kip activation</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="styleSheet">
+ <string notr="true">color: rgb(100, 100, 100);</string>
+ </property>
+ <property name="text">
+ <string>You will see UNREGISTERED in the window title (not recommended).</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
</property>
</widget>
</item>
Binary file not shown.
@@ -32,5 +32,10 @@ void ActivationNotifier::setIdentity(QString identity)
void ActivationNotifier::notify()
{
CoreInterface coreInterface;
- coreInterface.notifyActivation(m_Identity);
+ try {
+ coreInterface.notifyActivation(m_Identity);
+ }
+ catch (...) {
+ // catch all exceptions and fails silently
+ }
}
View
@@ -34,8 +34,9 @@
// 4: ssl plugin 'ns' v1.0
// 5: ssl plugin 'ns' v1.1
// 6: ssl plugin 'ns' v1.2
+// 7: serial key activation
//
-const int kWizardVersion = 6;
+const int kWizardVersion = 7;
class QSettings;
class SettingsDialog;
@@ -18,6 +18,7 @@
#ifndef COMMANDTHREAD_H
#define COMMANDTHREAD_H
+#include <QObject>
#include <QStringList>
class CommandProcess : public QObject
View
@@ -415,8 +415,8 @@ void MainWindow::checkConnected(const QString& line)
if (!appConfig().startedBefore() && isVisible()) {
QMessageBox::information(
this, "Synergy",
- tr("Synergy is now connected, You can close the "
- "config window. Synergy will remain connected in "
+ tr("Synergy is now connected. You can close the "
+ "config window and Synergy will remain connected in "
"the background."));
appConfig().setStartedBefore(true);
@@ -491,6 +491,15 @@ void MainWindow::restartSynergy()
startSynergy();
}
+void MainWindow::proofreadInfo()
+{
+ setEdition(m_AppConfig.edition());
+
+ int oldState = m_SynergyState;
+ m_SynergyState = synergyDisconnected;
+ setSynergyState((qSynergyState)oldState);
+}
+
void MainWindow::clearLog()
{
m_pLogOutput->clear();
@@ -958,7 +967,7 @@ void MainWindow::changeEvent(QEvent* event)
retranslateUi(this);
retranslateMenuBar();
- setEdition(m_AppConfig.edition());
+ proofreadInfo();
break;
}
View
@@ -178,6 +178,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
bool autoHide();
QString getTimeStamp();
void restartSynergy();
+ void proofreadInfo();
private:
QSettings& m_Settings;
@@ -89,7 +89,10 @@ void SettingsDialog::accept()
void SettingsDialog::reject()
{
- QSynergyApplication::getInstance()->switchTranslator(appConfig().language());
+ if (appConfig().language() != m_pComboLanguage->itemData(m_pComboLanguage->currentIndex()).toString()) {
+ QSynergyApplication::getInstance()->switchTranslator(appConfig().language());
+ }
+
QDialog::reject();
}
@@ -62,9 +62,9 @@ SetupWizard::SetupWizard(MainWindow& mainWindow, bool startMain) :
AppConfig& appConfig = m_MainWindow.appConfig();
m_pLineEditEmail->setText(appConfig.activateEmail());
- m_pLineEditSerialKey->setText(appConfig.serialKey());
+ m_pTextEditSerialKey->setText(appConfig.serialKey());
- m_pLineEditSerialKey->setEnabled(false);
+ m_pTextEditSerialKey->setEnabled(false);
}
@@ -120,15 +120,15 @@ bool SetupWizard::validateCurrentPage()
}
}
else if (m_pRadioButtonSubscription->isChecked()) {
- if (m_pLineEditSerialKey->text().isEmpty()) {
+ if (m_pTextEditSerialKey->toPlainText().isEmpty()) {
message.setText(tr("Please enter your subscription serial key."));
message.exec();
return false;
}
else {
// create subscription file in profile directory
SubscriptionManager subscriptionManager(this, m_MainWindow.appConfig(), m_Edition);
- if (!subscriptionManager.activateSerial(m_pLineEditSerialKey->text())) {
+ if (!subscriptionManager.activateSerial(m_pTextEditSerialKey->toPlainText())) {
return false;
}
@@ -206,9 +206,9 @@ void SetupWizard::accept()
if (m_pRadioButtonSubscription->isChecked())
{
- appConfig.setSerialKey(m_pLineEditSerialKey->text());
+ appConfig.setSerialKey(m_pTextEditSerialKey->toPlainText());
- notifyActivation("serial:" + m_pLineEditSerialKey->text());
+ notifyActivation("serial:" + m_pTextEditSerialKey->toPlainText());
}
if (m_pRadioButtonSkip->isChecked())
@@ -243,8 +243,7 @@ void SetupWizard::reject()
}
// treat cancel as skip
- CoreInterface coreInterface;
- coreInterface.notifyActivation("skip:unknown");
+ notifyActivation("skip:unknown");
QWizard::reject();
}
@@ -275,7 +274,7 @@ void SetupWizard::on_m_pRadioButtonSkip_toggled(bool checked)
if (checked) {
m_pLineEditEmail->setEnabled(false);
m_pLineEditPassword->setEnabled(false);
- m_pLineEditSerialKey->setEnabled(false);
+ m_pTextEditSerialKey->setEnabled(false);
}
}
@@ -284,7 +283,7 @@ void SetupWizard::on_m_pRadioButtonActivate_toggled(bool checked)
if (checked) {
m_pLineEditEmail->setEnabled(true);
m_pLineEditPassword->setEnabled(true);
- m_pLineEditSerialKey->setEnabled(false);
+ m_pTextEditSerialKey->setEnabled(false);
}
}
@@ -293,6 +292,6 @@ void SetupWizard::on_m_pRadioButtonSubscription_toggled(bool checked)
if (checked) {
m_pLineEditEmail->setEnabled(false);
m_pLineEditPassword->setEnabled(false);
- m_pLineEditSerialKey->setEnabled(true);
+ m_pTextEditSerialKey->setEnabled(true);
}
}
View
@@ -172,22 +172,33 @@ Log::print(const char* file, int line, const char* fmt, ...)
// do not prefix time and file for kPRINT (CLOG_PRINT)
if (priority != kPRINT) {
- char message[kLogMessageLength];
-
struct tm *tm;
- char tmp[220];
+ char timestamp[50];
time_t t;
time(&t);
tm = localtime(&t);
- sprintf(tmp, "%04i-%02i-%02iT%02i:%02i:%02i", tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
+ sprintf(timestamp, "%04i-%02i-%02iT%02i:%02i:%02i", tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
-#ifndef NDEBUG
- sprintf(message, "[%s] %s: %s\n\t%s,%d", tmp, g_priority[priority], buffer, file, line);
+ // square brackets, spaces, comma and null terminator take about 10
+ int size = 10;
+ size += strlen(timestamp);
+ size += strlen(g_priority[priority]);
+ size += strlen(buffer);
+#ifndef NDEBUG
+ size += strlen(file);
+ // assume there is no file contains over 100k lines of code
+ size += 6;
+#endif
+ char* message = new char[size];
+
+#ifndef NDEBUG
+ sprintf(message, "[%s] %s: %s\n\t%s,%d", timestamp, g_priority[priority], buffer, file, line);
#else
- sprintf(message, "[%s] %s: %s", tmp, g_priority[priority], buffer);
+ sprintf(message, "[%s] %s: %s", timestamp, g_priority[priority], buffer);
#endif
output(priority, message);
+ delete[] message;
} else {
output(priority, buffer);
}
Oops, something went wrong.

No commit comments for this range